explain.depesz.com

PostgreSQL's explain analyze made readable

Result: w9BMd

Settings
# exclusive inclusive rows x rows loops node
1. 69.268 1,437.102 ↑ 28.7 3,257 1

GroupAggregate (cost=457,237.94..468,208.56 rows=93,367 width=500) (actual time=1,363.431..1,437.102 rows=3,257 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. 49.425 1,367.834 ↑ 3.1 30,365 1

Sort (cost=457,237.94..457,471.36 rows=93,367 width=1,341) (actual time=1,363.369..1,367.834 rows=30,365 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: 12161kB
3. 15.864 1,318.409 ↑ 3.1 30,365 1

Hash Left Join (cost=11,353.44..449,530.20 rows=93,367 width=1,341) (actual time=434.118..1,318.409 rows=30,365 loops=1)

  • Hash Cond: (evs.ev_id = event_property_values.ev_id)
4. 3.436 880.569 ↑ 3.1 3,257 1

Nested Loop Left Join (cost=1,066.05..437,092.66 rows=10,007 width=1,277) (actual time=11.261..880.569 rows=3,257 loops=1)

5. 713.314 798.965 ↑ 3.1 3,257 1

Nested Loop Left Join (cost=1,065.77..431,790.16 rows=10,007 width=1,264) (actual time=11.079..798.965 rows=3,257 loops=1)

  • Filter: (((evs.creation_date > (now() - '7 days'::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() - '7 days'::interval))))
  • Rows Removed by Filter: 8294
6. 5.692 74.100 ↓ 1.0 11,551 1

Hash Left Join (cost=1,028.31..1,405.25 rows=11,383 width=1,275) (actual time=10.722..74.100 rows=11,551 loops=1)

  • Hash Cond: (evs.application_id = application.application_id)
7. 3.484 67.803 ↓ 1.0 11,551 1

Hash Join (cost=965.27..1,312.21 rows=11,383 width=1,267) (actual time=10.102..67.803 rows=11,551 loops=1)

  • Hash Cond: (evs.company_id = orgs.org_id)
8. 54.066 64.241 ↓ 1.0 11,551 1

Hash Right Join (cost=958.13..1,273.35 rows=11,517 width=1,236) (actual time=10.016..64.241 rows=11,551 loops=1)

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

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

10. 3.633 9.525 ↓ 1.0 11,551 1

Hash (cost=814.17..814.17 rows=11,517 width=115) (actual time=9.525..9.525 rows=11,551 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1560kB
11. 5.892 5.892 ↓ 1.0 11,551 1

Seq Scan on evs (cost=0.00..814.17 rows=11,517 width=115) (actual time=0.008..5.892 rows=11,551 loops=1)

12. 0.019 0.078 ↓ 1.0 88 1

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

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

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

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

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

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

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

16. 0.000 11.551 ↓ 0.0 0 11,551

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

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

SubPlan (forIndex Scan)

18. 0.000 704.611 ↑ 1.0 1 11,551

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

19.          

Initplan (forResult)

20. 11.551 704.611 ↑ 1.0 1 11,551

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

21. 693.060 693.060 ↑ 3.0 1 11,551

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,551)

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

Index Scan using ev_metadata_uc_ev_id on ev_metadata (cost=0.29..0.53 rows=1 width=21) (actual time=0.024..0.024 rows=1 loops=3,257)

  • Index Cond: (evs.ev_id = ev_id)
23. 32.039 421.976 ↓ 1.0 107,713 1

Hash (cost=8,944.19..8,944.19 rows=107,456 width=40) (actual time=421.976..421.976 rows=107,713 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 13628kB
24. 173.047 389.937 ↓ 1.0 107,790 1

Hash Right Join (cost=4,803.60..8,944.19 rows=107,456 width=40) (actual time=124.091..389.937 rows=107,790 loops=1)

  • Hash Cond: (event_property_text_values.event_property_value_id = event_property_values.event_property_value_id)
25. 26.327 102.105 ↓ 1.0 102,110 1

Hash Left Join (cost=1.94..2,805.54 rows=99,970 width=554) (actual time=8.480..102.105 rows=102,110 loops=1)

  • Hash Cond: (event_property_text_values.language_id = languages.language_id)
26. 75.751 75.751 ↓ 1.0 102,110 1

Seq Scan on event_property_text_values (cost=0.00..2,514.70 rows=99,970 width=46) (actual time=8.407..75.751 rows=102,110 loops=1)

27. 0.012 0.027 ↑ 1.0 42 1

Hash (cost=1.42..1.42 rows=42 width=524) (actual time=0.027..0.027 rows=42 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
28. 0.015 0.015 ↑ 1.0 42 1

Seq Scan on languages (cost=0.00..1.42 rows=42 width=524) (actual time=0.009..0.015 rows=42 loops=1)

29. 28.507 114.785 ↓ 1.0 107,790 1

Hash (cost=3,458.45..3,458.45 rows=107,456 width=25) (actual time=114.785..114.785 rows=107,790 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 7566kB
30. 86.278 86.278 ↓ 1.0 107,790 1

Seq Scan on event_property_values (cost=0.00..3,458.45 rows=107,456 width=25) (actual time=0.010..86.278 rows=107,790 loops=1)

  • Filter: (type = 3)
  • Rows Removed by Filter: 27402