explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NspF

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 4,577.589 ↑ 1.0 5 1

Limit (cost=82,224.46..82,224.47 rows=5 width=4) (actual time=4,577.587..4,577.589 rows=5 loops=1)

2.          

CTE paths

3. 5.423 5.423 ↑ 1,000.0 1 1

Function Scan on get_custom_values_path paths_1 (cost=0.25..32.75 rows=1,000 width=216) (actual time=5.422..5.423 rows=1 loops=1)

4. 0.015 4,577.587 ↑ 5.4 5 1

Sort (cost=82,191.71..82,191.78 rows=27 width=4) (actual time=4,577.586..4,577.587 rows=5 loops=1)

  • Sort Key: z.auction_date
  • Sort Method: top-N heapsort Memory: 25kB
5. 0.576 4,577.572 ↑ 2.1 13 1

HashAggregate (cost=82,190.99..82,191.26 rows=27 width=4) (actual time=4,577.567..4,577.572 rows=13 loops=1)

  • Group Key: z.auction_date
6. 1,212.037 4,576.996 ↑ 4.0 3,132 1

Hash Join (cost=81,891.30..82,159.30 rows=12,675 width=4) (actual time=3,640.426..4,576.996 rows=3,132 loops=1)

  • Hash Cond: (paths.id_child_of_market = zp.customer_id)
7. 5.429 5.429 ↑ 1,000.0 1 1

CTE Scan on paths (cost=0.00..20.00 rows=1,000 width=4) (actual time=5.427..5.429 rows=1 loops=1)

8. 1,025.742 3,359.530 ↓ 225.9 4,543,233 1

Hash (cost=81,639.85..81,639.85 rows=20,116 width=8) (actual time=3,359.530..3,359.530 rows=4,543,233 loops=1)

  • Buckets: 131072 (originally 32768) Batches: 256 (originally 1) Memory Usage: 3488kB
9. 1,333.340 2,333.788 ↓ 225.9 4,543,233 1

Hash Join (cost=11,070.31..81,639.85 rows=20,116 width=8) (actual time=43.225..2,333.788 rows=4,543,233 loops=1)

  • Hash Cond: (zp.zaiko_group_id = z.group_id)
10. 355.767 990.699 ↑ 1.0 3,334,500 1

Append (cost=0.00..57,864.00 rows=3,334,501 width=8) (actual time=0.058..990.699 rows=3,334,500 loops=1)

11. 0.008 0.008 ↓ 0.0 0 1

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

12. 634.924 634.924 ↑ 1.0 3,334,500 1

Seq Scan on zaiko_publish zp_1 (cost=0.00..57,864.00 rows=3,334,500 width=8) (actual time=0.049..634.924 rows=3,334,500 loops=1)

13. 1.127 9.749 ↓ 162.4 4,386 1

Hash (cost=11,069.98..11,069.98 rows=27 width=8) (actual time=9.749..9.749 rows=4,386 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 236kB
14. 0.598 8.622 ↓ 162.5 4,387 1

Append (cost=0.00..11,069.98 rows=27 width=8) (actual time=0.036..8.622 rows=4,387 loops=1)

15. 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())))
16. 8.021 8.021 ↓ 168.7 4,387 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.032..8.021 rows=4,387 loops=1)

  • Index Cond: (auction_date > date_trunc('day'::text, now()))
  • Filter: (id = orgid)
  • Rows Removed by Filter: 1603