Closed kwongtn closed 7 months ago
Hi @kwongtn, you can use the --log-explain
option to get the error message.
@ankane this is what it shows -- I presume that if it is just a single layer it will show "could not run explain"?
[sql] EXPLAIN (FORMAT JSON)
SELECT COUNT(*) AS "__count" FROM "notification_notification" WHERE ("notification_notification"."tenant_account_id" = xxx AND "notification_notification"."agent_id" = xxx AND "notification_notification"."id" = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'::uuid AND "notification_notification"."agent_id" = xxx)
[sql] EXPLAIN (FORMAT TEXT)
SELECT COUNT(*) AS "__count" FROM "notification_notification" WHERE ("notification_notification"."tenant_account_id" = xxx AND "notification_notification"."agent_id" = xxx AND "notification_notification"."id" = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'::uuid AND "notification_notification"."agent_id" = xxx)
Aggregate (cost=4.17..4.18 rows=1 width=8)
-> Index Scan using chat_notification_tenant_account_id_2edd2b1e on notification_notification (cost=0.14..4.17 rows=1 width=0)
Index Cond: (tenant_account_id = xxx)
Filter: ((agent_id = xxx) AND (id = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'::uuid))
EXPLAIN (FORMAT TEXT)
should show up 3 times for the query, so it's likely happening in another part of the output.
The following queries show a "could not run explain" when run via dexter:
However it returns results when run manually using
EXPLAIN ANALYZE
:Help? 😂