explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ycxq

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 2,352.397 ↑ 1.0 5 1

Limit (cost=0.45..2,693.64 rows=5 width=4) (actual time=0.985..2,352.397 rows=5 loops=1)

2. 1.165 2,352.393 ↑ 6.2 5 1

Unique (cost=0.45..16,698.25 rows=31 width=4) (actual time=0.984..2,352.393 rows=5 loops=1)

3. 6.837 2,351.228 ↓ 93.4 2,895 1

Nested Loop (cost=0.45..16,698.17 rows=31 width=4) (actual time=0.982..2,351.228 rows=2,895 loops=1)

4. 1.248 10.727 ↓ 119.5 3,942 1

Merge Append (cost=0.45..13,283.95 rows=33 width=8) (actual time=0.033..10.727 rows=3,942 loops=1)

  • Sort Key: z.auction_date
5. 0.004 0.007 ↓ 0.0 0 1

Sort (cost=0.01..0.02 rows=1 width=8) (actual time=0.007..0.007 rows=0 loops=1)

  • Sort Key: z.auction_date
  • Sort Method: quicksort Memory: 25kB
6. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on zaiko z (cost=0.00..0.00 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=1)

  • Filter: ((id = orgid) AND (auction_date > date_trunc('day'::text, now())))
7. 9.472 9.472 ↓ 123.2 3,942 1

Index Scan using zaiko_auction_date_idx on zaiko z_1 (cost=0.43..13,283.68 rows=32 width=8) (actual time=0.026..9.472 rows=3,942 loops=1)

  • Index Cond: (auction_date > date_trunc('day'::text, now()))
  • Filter: (id = orgid)
  • Rows Removed by Filter: 1493
8. 15.768 2,333.664 ↑ 2.0 1 3,942

Append (cost=0.00..103.44 rows=2 width=4) (actual time=0.592..0.592 rows=1 loops=3,942)

9. 0.000 0.000 ↓ 0.0 0 3,942

Seq Scan on zaiko_publish zp (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=3,942)

  • Filter: ((customer_id = 32) AND (z.group_id = zaiko_group_id))
10. 11.826 2,317.896 ↑ 1.0 1 3,942

Bitmap Heap Scan on zaiko_publish zp_1 (cost=99.43..103.44 rows=1 width=4) (actual time=0.588..0.588 rows=1 loops=3,942)

  • Recheck Cond: ((zaiko_group_id = z.group_id) AND (customer_id = 32))
  • Heap Blocks: exact=2895
11. 8.954 2,306.070 ↓ 0.0 0 3,942

BitmapAnd (cost=99.43..99.43 rows=1 width=0) (actual time=0.585..0.585 rows=0 loops=3,942)

12. 189.216 189.216 ↓ 1.4 1,075 3,942

Bitmap Index Scan on zaiko_publish_zaiko_group_id_idx (cost=0.00..18.01 rows=744 width=0) (actual time=0.048..0.048 rows=1,075 loops=3,942)

  • Index Cond: (zaiko_group_id = z.group_id)
13. 2,107.900 2,107.900 ↑ 1.1 3,714 3,940

Bitmap Index Scan on zaiko_publish_customer_id_idx (cost=0.00..80.11 rows=4,224 width=0) (actual time=0.535..0.535 rows=3,714 loops=3,940)

  • Index Cond: (customer_id = 32)
Planning time : 0.783 ms
Execution time : 2,352.478 ms