0

I'm currently running some queries and they're taking a huge time even with indexing(the table doesn't even have 20k entries), its an UPDATE set, I'm trying to see the results of the UPDATE SET to see what it could be, how can I do that with an ResultSet, is it possible?

  • Use [MariaDB :: EXPLAIN](https://mariadb.com/kb/en/explain/): `... When you precede a SELECT, UPDATE or a DELETE statement with the keyword EXPLAIN, MariaDB displays information from the optimizer about the query execution plan. ...`. – wchiquito Aug 25 '22 at 18:03
  • `EXPLAIN`, like `SELECT` returns a ResultSet and can be treated the same way. If you use [ANALYZE](https://mariadb.com/kb/en/analyze-statement/) or [ANALYZE FORMAT=JSON](https://mariadb.com/kb/en/analyze-format-json/) the query is actually executed and the resultset contains the analysis. Also look at [profile](https://mariadb.com/kb/en/show-profile/). Depending on what you mean by a huge time, it does sound suspicious for 20k entries. (FK impacts maybe). [dba stackexchange](https://dba.stackexchange.com/) can help with more details. – danblack Aug 27 '22 at 01:29

0 Answers0