explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qAHO

Settings
# exclusive inclusive rows x rows loops node
1. 89.930 1,555.886 ↑ 8.3 2,972 1

GroupAggregate (cost=113,311.25..115,409.82 rows=24,662 width=17) (actual time=1,398.808..1,555.886 rows=2,972 loops=1)

  • Group Key: e.produto
  • Buffers: shared hit=157,722 read=15,787 written=19, temp read=140 written=140
2. 187.704 1,465.956 ↑ 3.4 41,608 1

Sort (cost=113,311.25..113,669.31 rows=143,224 width=17) (actual time=1,398.739..1,465.956 rows=41,608 loops=1)

  • Sort Key: e.produto
  • Sort Method: external merge Disk: 1,112kB
  • Buffers: shared hit=157,722 read=15,787 written=19, temp read=140 written=140
3. 319.912 1,278.252 ↑ 3.4 41,608 1

Nested Loop (cost=96,839.7..98,105.6 rows=143,224 width=17) (actual time=307.139..1,278.252 rows=41,608 loops=1)

  • Buffers: shared hit=157,722 read=15,787 written=19
4. 150.176 542.260 ↓ 2,972.0 41,608 1

Hash Join (cost=96,839.28..97,987.23 rows=14 width=12) (actual time=307.072..542.26 rows=41,608 loops=1)

  • Buffers: shared hit=318 read=3,302 written=19
5. 161.241 391.993 ↑ 1.2 41,608 1

HashAggregate (cost=96,810.9..97,294.25 rows=48,335 width=10) (actual time=306.966..391.993 rows=41,608 loops=1)

  • Group Key: p.codigo, f_1.codigo
  • Buffers: shared hit=290 read=3,302 written=19
6. 125.106 230.752 ↑ 1.2 41,608 1

Nested Loop (cost=428.13..96,569.22 rows=48,335 width=10) (actual time=2.688..230.752 rows=41,608 loops=1)

  • Buffers: shared hit=290 read=3,302 written=19
7. 0.142 0.142 ↑ 1.0 14 1

Index Scan using pkfiliais_codigo on filiais f_1 (cost=0.26..83.38 rows=14 width=2) (actual time=0.007..0.142 rows=14 loops=1)

  • Filter: f_1.estoque_site
  • Buffers: shared hit=20 read=2
8. 66.198 105.504 ↑ 2.3 2,972 14

Materialize (cost=427.87..95,053.05 rows=6,905 width=12) (actual time=0.193..7.536 rows=2,972 loops=14)

  • Buffers: shared hit=270 read=3,300 written=19
9. 37.168 39.306 ↑ 2.3 2,972 1

Bitmap Heap Scan on produtos p (cost=427.87..95,018.53 rows=6,905 width=12) (actual time=2.67..39.306 rows=2,972 loops=1)

  • Filter: (p.aparecernosite AND (NOT p.inativol))
  • Heap Blocks: exact=3,537
  • Buffers: shared hit=270 read=3,300 written=19
10. 2.138 2.138 ↑ 6.2 6,067 1

Bitmap Index Scan on produtos_gidx (cost=0..426.14 rows=37,584 width=0) (actual time=2.138..2.138 rows=6,067 loops=1)

  • Index Cond: (p.busca @@ (replace(replace(((plainto_tsquery('skechers masculino'::text))::character varying)::text, '&'::text, '|'::text), ''''::text, ''::text))::tsquery)
  • Buffers: shared hit=3 read=30
11. 0.037 0.091 ↑ 1.0 17 1

Hash (cost=28.17..28.17 rows=17 width=2) (actual time=0.091..0.091 rows=17 loops=1)

  • Buffers: shared hit=28
12. 0.054 0.054 ↑ 1.0 17 1

Seq Scan on filiais f (cost=0..28.17 rows=17 width=2) (actual time=0.005..0.054 rows=17 loops=1)

  • Buffers: shared hit=28
13. 416.080 416.080 ↑ 1.0 1 41,608

Index Scan using pkestoque on estoques e (cost=0.42..8.45 rows=1 width=19) (actual time=0.008..0.01 rows=1 loops=41,608)

  • Index Cond: ((e.produto = p.codigo) AND (e.filial = f.codigo))
  • Buffers: shared hit=157,404 read=12,485
Planning time : 1.147 ms
Execution time : 1,562.693 ms