explain.depesz.com

PostgreSQL's explain analyze made readable

Result: q5zx

Settings
# exclusive inclusive rows x rows loops node
1. 9.456 2,549.058 ↑ 24.0 492 1

GroupAggregate (cost=444,499.96..445,885.63 rows=11,793 width=500) (actual time=2,539.331..2,549.058 rows=492 loops=1)

  • Group Key: orgs.org_id, evs.ev_id, ((integration_logs.job_result)::character varying), integrations.operation, application.integration_config_type, application.built_in, integration_logs.job_completed_time, ev_metadata.xm_webservice_initiated, ev_metadata.web_updated
2. 7.605 2,539.602 ↑ 2.7 4,411 1

Sort (cost=444,499.96..444,529.44 rows=11,793 width=1,341) (actual time=2,539.287..2,539.602 rows=4,411 loops=1)

  • Sort Key: orgs.org_id, evs.ev_id, ((integration_logs.job_result)::character varying), integrations.operation, application.integration_config_type, application.built_in, integration_logs.job_completed_time, ev_metadata.xm_webservice_initiated, ev_metadata.web_updated
  • Sort Method: quicksort Memory: 1619kB
3. 1.348 2,531.997 ↑ 2.7 4,411 1

Nested Loop Left Join (cost=1,067.03..443,702.42 rows=11,793 width=1,341) (actual time=324.608..2,531.997 rows=4,411 loops=1)

4. 0.738 1,018.241 ↑ 2.6 492 1

Nested Loop Left Join (cost=1,066.05..432,459.96 rows=1,264 width=1,277) (actual time=278.776..1,018.241 rows=492 loops=1)

5. 718.637 982.079 ↑ 2.6 492 1

Nested Loop Left Join (cost=1,065.77..431,790.16 rows=1,264 width=1,264) (actual time=278.739..982.079 rows=492 loops=1)

  • Filter: (((evs.creation_date > (now() - '1 day'::interval)) AND (evs.application_name IS NOT NULL) AND (evs.system_message_type IS NULL)) OR (((integrations.type)::text = 'INBOUND_WEBHOOK'::text) AND (integration_logs.job_completed_time > (now() - '1 day'::interval))))
  • Rows Removed by Filter: 11057
6. 6.110 240.344 ↓ 1.0 11,549 1

Hash Left Join (cost=1,028.31..1,405.25 rows=11,383 width=1,275) (actual time=82.247..240.344 rows=11,549 loops=1)

  • Hash Cond: (evs.application_id = application.application_id)
7. 3.854 233.375 ↓ 1.0 11,549 1

Hash Join (cost=965.27..1,312.21 rows=11,383 width=1,267) (actual time=81.336..233.375 rows=11,549 loops=1)

  • Hash Cond: (evs.company_id = orgs.org_id)
8. 193.638 229.399 ↓ 1.0 11,549 1

Hash Right Join (cost=958.13..1,273.35 rows=11,517 width=1,236) (actual time=81.206..229.399 rows=11,549 loops=1)

  • Hash Cond: (((((integration_logs.job_result)::character varying)::json #>> '{job,request,requestId}'::text[]))::uuid = evs.request_id)
9. 21.326 21.326 ↓ 1.0 644 1

Seq Scan on integration_logs (cost=0.00..246.14 rows=614 width=1,121) (actual time=13.366..21.326 rows=644 loops=1)

10. 3.814 14.435 ↓ 1.0 11,549 1

Hash (cost=814.17..814.17 rows=11,517 width=115) (actual time=14.434..14.435 rows=11,549 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1560kB
11. 10.621 10.621 ↓ 1.0 11,549 1

Seq Scan on evs (cost=0.00..814.17 rows=11,517 width=115) (actual time=0.022..10.621 rows=11,549 loops=1)

12. 0.019 0.122 ↓ 1.0 88 1

Hash (cost=6.08..6.08 rows=85 width=39) (actual time=0.122..0.122 rows=88 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
13. 0.103 0.103 ↓ 1.0 88 1

Seq Scan on orgs (cost=0.00..6.08 rows=85 width=39) (actual time=0.020..0.103 rows=88 loops=1)

  • Filter: ((name)::text <> '-1'::text)
14. 0.205 0.859 ↑ 1.0 1,024 1

Hash (cost=50.24..50.24 rows=1,024 width=15) (actual time=0.859..0.859 rows=1,024 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 49kB
15. 0.654 0.654 ↑ 1.0 1,024 1

Seq Scan on application (cost=0.00..50.24 rows=1,024 width=15) (actual time=0.023..0.654 rows=1,024 loops=1)

16. 0.000 23.098 ↓ 0.0 0 11,549

Index Scan using integrations_application_id_name_uidx on integrations (cost=37.46..37.67 rows=5 width=36) (actual time=0.002..0.002 rows=0 loops=11,549)

  • Index Cond: (application_id = (SubPlan 2))
17.          

SubPlan (forIndex Scan)

18. 11.549 704.489 ↑ 1.0 1 11,549

Result (cost=37.17..37.18 rows=1 width=8) (actual time=0.061..0.061 rows=1 loops=11,549)

19.          

Initplan (forResult)

20. 0.000 692.940 ↑ 1.0 1 11,549

Limit (cost=0.28..37.17 rows=1 width=8) (actual time=0.060..0.060 rows=1 loops=11,549)

21. 692.940 692.940 ↑ 3.0 1 11,549

Index Scan Backward using integrations_integration_id_pk on integrations integrations_1 (cost=0.28..110.97 rows=3 width=8) (actual time=0.060..0.060 rows=1 loops=11,549)

  • Index Cond: (integration_id IS NOT NULL)
  • Filter: ((application_id)::numeric = application.application_id)
  • Rows Removed by Filter: 148
22. 35.424 35.424 ↑ 1.0 1 492

Index Scan using ev_metadata_uc_ev_id on ev_metadata (cost=0.29..0.53 rows=1 width=21) (actual time=0.072..0.072 rows=1 loops=492)

  • Index Cond: (evs.ev_id = ev_id)
23. 10.353 1,512.408 ↑ 1.3 9 492

Nested Loop Left Join (cost=0.98..8.73 rows=12 width=40) (actual time=2.064..3.074 rows=9 loops=492)

24. 3.150 1,497.648 ↑ 1.3 9 492

Nested Loop Left Join (cost=0.84..6.72 rows=12 width=63) (actual time=2.056..3.044 rows=9 loops=492)

25. 833.448 833.448 ↑ 1.3 9 492

Index Scan using idx_epv_ev_id on event_property_values (cost=0.42..1.05 rows=12 width=25) (actual time=0.994..1.694 rows=9 loops=492)

  • Index Cond: (evs.ev_id = ev_id)
  • Filter: (type = 3)
  • Rows Removed by Filter: 2
26. 661.050 661.050 ↑ 1.0 1 4,407

Index Scan using idx_eptv_prop_id on event_property_text_values (cost=0.42..0.46 rows=1 width=46) (actual time=0.150..0.150 rows=1 loops=4,407)

  • Index Cond: (event_property_values.event_property_value_id = event_property_value_id)
27. 4.407 4.407 ↑ 1.0 1 4,407

Index Scan using languages_pk on languages (cost=0.14..0.16 rows=1 width=524) (actual time=0.001..0.001 rows=1 loops=4,407)

  • Index Cond: (language_id = event_property_text_values.language_id)