explain.depesz.com

PostgreSQL's explain analyze made readable

Result: q1KJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 717.773 ↑ 1.0 100 1

Limit (cost=108,920.96..108,922.96 rows=100 width=104) (actual time=715.698..717.773 rows=100 loops=1)

2. 0.953 717.757 ↑ 113.8 100 1

Unique (cost=108,920.96..109,148.64 rows=11,384 width=104) (actual time=715.696..717.757 rows=100 loops=1)

3. 74.789 716.804 ↑ 3.3 3,498 1

Sort (cost=108,920.96..108,949.42 rows=11,384 width=104) (actual time=715.692..716.804 rows=3,498 loops=1)

  • Sort Key: ((SubPlan 2)) DESC, (lower((producto.pdt_nombre)::text)), a1.asi_pdt_id, producto.pdt_nombre, producto.pdt_refantigua, ((SubPlan 1)), ((SubPlan 3))
  • Sort Method: external merge Disk: 2160kB
4. 39.801 642.015 ↓ 1.5 17,642 1

Hash Join (cost=13,830.36..108,153.98 rows=11,384 width=104) (actual time=70.028..642.015 rows=17,642 loops=1)

  • Hash Cond: (a1.asi_pdt_id = producto.pdt_id)
5. 3.337 3.337 ↓ 1.0 25,317 1

Seq Scan on avisos_stock_interesados a1 (cost=0.00..460.72 rows=24,672 width=4) (actual time=0.022..3.337 rows=25,317 loops=1)

6. 4.384 69.617 ↓ 1.0 13,339 1

Hash (cost=13,663.89..13,663.89 rows=13,318 width=58) (actual time=69.617..69.617 rows=13,339 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1226kB
7. 55.564 65.233 ↓ 1.0 13,339 1

Bitmap Heap Scan on producto (cost=1,265.23..13,663.89 rows=13,318 width=58) (actual time=10.791..65.233 rows=13,339 loops=1)

  • Recheck Cond: (pdt_visible = B'1'::bit(1))
  • Filter: (pdt_alquiler = 0)
  • Heap Blocks: exact=7753
8. 9.669 9.669 ↓ 1.0 13,345 1

Bitmap Index Scan on index3_producto (cost=0.00..1,261.90 rows=13,318 width=0) (actual time=9.669..9.669 rows=13,345 loops=1)

  • Index Cond: (pdt_visible = B'1'::bit(1))
9.          

SubPlan (for Hash Join)

10. 17.642 105.852 ↑ 1.0 1 17,642

Aggregate (cost=3.15..3.16 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=17,642)

11. 88.210 88.210 ↑ 1.0 1 17,642

Index Scan using index2_producto_imagen on producto_imagen pimg (cost=0.29..3.15 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=17,642)

  • Index Cond: (pimg_idproducto = a1.asi_pdt_id)
  • Filter: ((pimg_visible = B'1'::"bit") AND (pimg_representativa = B'1'::"bit"))
  • Rows Removed by Filter: 3
12. 88.210 317.556 ↑ 1.0 1 17,642

Aggregate (cost=2.55..2.56 rows=1 width=8) (actual time=0.018..0.018 rows=1 loops=17,642)

13. 229.346 229.346 ↓ 8.3 25 17,642

Index Only Scan using avisos_stock_interesados_uk1 on avisos_stock_interesados a2 (cost=0.29..2.54 rows=3 width=4) (actual time=0.003..0.013 rows=25 loops=17,642)

  • Index Cond: (asi_pdt_id = a1.asi_pdt_id)
  • Heap Fetches: 424207
14. 0.000 105.852 ↑ 1.0 1 17,642

Limit (cost=2.51..2.52 rows=1 width=6) (actual time=0.006..0.006 rows=1 loops=17,642)

15. 17.642 105.852 ↑ 1.0 1 17,642

Sort (cost=2.51..2.52 rows=1 width=6) (actual time=0.006..0.006 rows=1 loops=17,642)

  • Sort Key: avisos_stock_revisados.asr_id
  • Sort Method: quicksort Memory: 25kB
16. 88.210 88.210 ↓ 2.0 2 17,642

Index Scan using avisos_stock_revisados_idx1 on avisos_stock_revisados (cost=0.29..2.50 rows=1 width=6) (actual time=0.003..0.005 rows=2 loops=17,642)

  • Index Cond: (asr_pdt_id = a1.asi_pdt_id)
Planning time : 3.068 ms
Execution time : 718.742 ms