explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QWki

Settings
# exclusive inclusive rows x rows loops node
1. 0.044 16,977.526 ↑ 1.0 15 1

Sort (cost=28,350.82..28,350.83 rows=15 width=40) (actual time=16,977.525..16,977.526 rows=15 loops=1)

  • Sort Key: (count(DISTINCT s.id)) DESC
  • Sort Method: quicksort Memory: 26kB
2. 7,809.613 16,977.482 ↑ 1.0 15 1

GroupAggregate (cost=0.17..28,350.76 rows=15 width=40) (actual time=844.941..16,977.482 rows=15 loops=1)

  • Group Key: s.customer_id
3. 1,579.674 9,167.869 ↓ 1.1 505,153 1

Nested Loop Left Join (cost=0.17..27,406.03 rows=472,340 width=48) (actual time=0.032..9,167.869 rows=505,153 loops=1)

4. 967.399 967.399 ↑ 1.0 56,588 1

Index Scan using index_suppliers_on_customer_id on suppliers s (cost=0.08..3,254.36 rows=57,185 width=32) (actual time=0.012..967.399 rows=56,588 loops=1)

5. 6,620.796 6,620.796 ↑ 1.4 9 56,588

Index Only Scan using effect_uniqueness on supplier_location_indicator_message_effects e (cost=0.08..0.38 rows=13 width=32) (actual time=0.083..0.117 rows=9 loops=56,588)

  • Index Cond: (supplier_id = s.id)
  • Heap Fetches: 259,886