shatteredsilicon / ssm-submodules

GNU Affero General Public License v3.0
1 stars 2 forks source link

EXPLAIN SELECT equivalents of DELETE statements #114

Closed gordan-bobic closed 1 year ago

gordan-bobic commented 1 year ago

This is similar to https://github.com/shatteredsilicon/ssm-submodules/issues/112

DELETE statements can't have an EXPLAIN, but they could be re-written into equivalent SELECTs, e.g. by replacing:

DELETE ... FROM ...

with

SELECT * FROM ...

It would be really useful to have the EXPLAIN of the SELECT equivalent.

Note: Newer versions of MySQL / MariaDB may support EXPLAIN for DELETEs, where available we should use the native EXPLAIN.