explain.depesz.com

PostgreSQL's explain analyze made readable

Result: E9Qs

Settings
# exclusive inclusive rows x rows loops node
1. 79.463 3,821.734 ↑ 24.7 156 1

GroupAggregate (cost=130,537.30..131,537.71 rows=3,852 width=69) (actual time=3,724.256..3,821.734 rows=156 loops=1)

  • Group Key: lepr.partner_organization_ueid
2. 52.343 3,742.271 ↓ 1.2 43,161 1

Sort (cost=130,537.30..130,624.74 rows=34,978 width=69) (actual time=3,724.157..3,742.271 rows=43,161 loops=1)

  • Sort Key: lepr.partner_organization_ueid
  • Sort Method: quicksort Memory: 7604kB
3. 1,417.654 3,689.928 ↓ 1.2 43,161 1

Hash Join (cost=35,798.04..127,897.48 rows=34,978 width=69) (actual time=581.821..3,689.928 rows=43,161 loops=1)

  • Hash Cond: (statistic.edh_identifier_summary_ueid = edh_ids.ueid)
4. 1,690.970 1,690.970 ↓ 1.0 3,263,933 1

Seq Scan on edh_identifier_usage_statistic statistic (cost=0.00..79,514.53 rows=3,262,702 width=32) (actual time=0.010..1,690.970 rows=3,263,933 loops=1)

  • Filter: (date <= now())
5. 3.824 581.304 ↓ 1.3 4,275 1

Hash (cost=35,756.09..35,756.09 rows=3,356 width=53) (actual time=581.304..581.304 rows=4,275 loops=1)

  • Buckets: 8192 (originally 4096) Batches: 1 (originally 1) Memory Usage: 411kB
6. 8.619 577.480 ↓ 1.3 4,275 1

Nested Loop Left Join (cost=24,933.48..35,756.09 rows=3,356 width=53) (actual time=232.694..577.480 rows=4,275 loops=1)

7. 6.393 547.486 ↓ 1.3 4,275 1

Nested Loop Left Join (cost=24,933.06..33,636.71 rows=3,356 width=53) (actual time=232.682..547.486 rows=4,275 loops=1)

8. 140.718 515.443 ↓ 1.3 4,275 1

Hash Right Join (cost=24,932.63..31,773.80 rows=3,356 width=53) (actual time=232.659..515.443 rows=4,275 loops=1)

  • Hash Cond: (c.edh_identifier_summary_ueid = edh_ids.ueid)
9. 142.319 142.319 ↓ 1.1 314,441 1

Seq Scan on edh_identifier_summary_affiliation_cross c (cost=0.00..5,736.33 rows=286,433 width=32) (actual time=0.004..142.319 rows=314,441 loops=1)

10. 3.870 232.406 ↓ 1.3 4,275 1

Hash (cost=24,890.68..24,890.68 rows=3,356 width=37) (actual time=232.406..232.406 rows=4,275 loops=1)

  • Buckets: 8192 (originally 4096) Batches: 1 (originally 1) Memory Usage: 349kB
11. 228.536 228.536 ↓ 1.3 4,275 1

Seq Scan on edh_identifier_summary edh_ids (cost=0.00..24,890.68 rows=3,356 width=37) (actual time=0.067..228.536 rows=4,275 loops=1)

  • Filter: ((((kpp)::text ~~ '24%'::text) OR (((kpp IS NULL) OR ((kpp)::text ~ '^(?:9(?:0|6).*)$'::text)) AND ((inn)::text ~~ '24%'::text))) AND (((kpp)::text !~~ '9999%'::text) OR ((kpp IS NULL) AND ((inn)::text !~~ '9999%'::text)) OR (((kpp)::text !~ '^(?:9(?:0|6).*)$'::text) AND ((inn)::text !~ '^(?:9(?:0|6).*)$'::text))))
  • Rows Removed by Filter: 345238
12. 25.650 25.650 ↑ 1.0 1 4,275

Index Scan using edh_affiliation_pkey on edh_affiliation affiliation (cost=0.42..0.55 rows=1 width=32) (actual time=0.005..0.006 rows=1 loops=4,275)

  • Index Cond: (c.edh_affiliation_ueid = ueid)
13. 21.375 21.375 ↑ 1.0 1 4,275

Index Scan using edh_legal_entity_partner_relation_pkey on edh_legal_entity_partner_relation lepr (cost=0.42..0.62 rows=1 width=32) (actual time=0.005..0.005 rows=1 loops=4,275)

  • Index Cond: (affiliation.edh_legal_entity_partner_relation_ueid = ueid)
Planning time : 1.332 ms
Execution time : 3,821.909 ms