explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0365

Settings
# exclusive inclusive rows x rows loops node
1. 12.930 309,606.372 ↓ 34.5 56,121 1

Group (cost=30,522.24..30,538.49 rows=1,625 width=39) (actual time=309,586.686..309,606.372 rows=56,121 loops=1)

  • Group Key: x.barcode, x.libelle, x.category_id_from_store
2. 220.842 309,593.442 ↓ 34.5 56,121 1

Sort (cost=30,522.24..30,526.30 rows=1,625 width=39) (actual time=309,586.684..309,593.442 rows=56,121 loops=1)

  • Sort Key: x.barcode, x.libelle, x.category_id_from_store
  • Sort Method: quicksort Memory: 6447kB
3. 174.728 309,372.600 ↓ 34.5 56,121 1

Nested Loop (cost=19,801.70..30,435.58 rows=1,625 width=39) (actual time=191.220..309,372.600 rows=56,121 loops=1)

4. 88.387 239.212 ↓ 44.3 55,910 1

HashAggregate (cost=19,801.15..19,813.78 rows=1,263 width=32) (actual time=182.823..239.212 rows=55,910 loops=1)

  • Group Key: ("ANY_subquery".store_id)::text, ("ANY_subquery".barcode)::text, "ANY_subquery".date
5. 7.526 150.825 ↓ 4.4 55,910 1

Subquery Scan on ANY_subquery (cost=19,453.90..19,706.44 rows=12,627 width=32) (actual time=123.631..150.825 rows=55,910 loops=1)

6. 74.760 143.299 ↓ 4.4 55,910 1

HashAggregate (cost=19,453.90..19,580.17 rows=12,627 width=32) (actual time=123.628..143.299 rows=55,910 loops=1)

  • Group Key: productids_summaries.store_id, productids_summaries.barcode
7. 68.539 68.539 ↓ 5.0 64,764 1

Index Scan using pk_productids_summaries on productids_summaries (cost=0.55..19,356.41 rows=12,999 width=32) (actual time=0.035..68.539 rows=64,764 loops=1)

  • Index Cond: ((store_id)::text = ANY ('{82682-82069}'::text[]))
8. 308,958.660 308,958.660 ↑ 1.0 1 55,910

Index Scan using pk_productids_summaries on productids_summaries x (cost=0.55..8.40 rows=1 width=59) (actual time=3.017..5.526 rows=1 loops=55,910)

  • Index Cond: (((store_id)::text = ("ANY_subquery".store_id)::text) AND ((store_id)::text = ANY ('{82682-82069}'::text[])) AND ((barcode)::text = ("ANY_subquery".barcode)::text))
  • Filter: ("ANY_subquery".date = date)