explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6BW

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 2,636.699 ↑ 1.0 5 1

Limit (cost=0.45..8,026.19 rows=5 width=4) (actual time=15.888..2,636.699 rows=5 loops=1)

2. 0.899 2,636.694 ↑ 2.2 5 1

Unique (cost=0.45..17,657.07 rows=11 width=4) (actual time=15.887..2,636.694 rows=5 loops=1)

3. 1,635.853 2,635.795 ↓ 263.2 2,895 1

Nested Loop (cost=0.45..17,657.05 rows=11 width=4) (actual time=15.884..2,635.795 rows=2,895 loops=1)

  • Join Filter: (z.group_id = zp.zaiko_group_id)
  • Rows Removed by Join Filter: 14637583
4. 1.007 10.500 ↓ 146.0 3,942 1

Merge Append (cost=0.45..11,070.20 rows=27 width=8) (actual time=0.029..10.500 rows=3,942 loops=1)

  • Sort Key: z.auction_date
5. 0.003 0.006 ↓ 0.0 0 1

Sort (cost=0.01..0.02 rows=1 width=8) (actual time=0.006..0.006 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.487 9.487 ↓ 151.6 3,942 1

Index Scan using zaiko_auction_date_idx on zaiko z_1 (cost=0.43..11,069.98 rows=26 width=8) (actual time=0.021..9.487 rows=3,942 loops=1)

  • Index Cond: (auction_date > date_trunc('day'::text, now()))
  • Filter: (id = orgid)
  • Rows Removed by Filter: 1493
8. 976.799 989.442 ↓ 2.0 3,714 3,942

Materialize (cost=0.00..5,830.95 rows=1,878 width=4) (actual time=0.000..0.251 rows=3,714 loops=3,942)

9. 0.574 12.643 ↓ 2.0 3,714 1

Append (cost=0.00..5,821.56 rows=1,878 width=4) (actual time=1.484..12.643 rows=3,714 loops=1)

10. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on zaiko_publish zp (cost=0.00..0.00 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: (customer_id = 32)
11. 11.312 12.067 ↓ 2.0 3,714 1

Bitmap Heap Scan on zaiko_publish zp_1 (cost=38.98..5,821.56 rows=1,877 width=4) (actual time=1.481..12.067 rows=3,714 loops=1)

  • Recheck Cond: (customer_id = 32)
  • Heap Blocks: exact=3671
12. 0.755 0.755 ↓ 2.0 3,714 1

Bitmap Index Scan on zaiko_publish_customer_id_idx (cost=0.00..38.51 rows=1,877 width=0) (actual time=0.755..0.755 rows=3,714 loops=1)

  • Index Cond: (customer_id = 32)