explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tEIV

Settings
# exclusive inclusive rows x rows loops node
1. 185.778 3,097.854 ↓ 148.6 2,972 1

HashAggregate (cost=158,580.94..158,581.19 rows=20 width=17) (actual time=3,092.031..3,097.854 rows=2,972 loops=1)

  • Group Key: e.produto
  • Buffers: shared hit=4,221 read=52,619
2. 1,165.171 2,912.076 ↓ 2,080.4 41,608 1

Hash Join (cost=90,188.76..158,580.74 rows=20 width=17) (actual time=437.223..2,912.076 rows=41,608 loops=1)

  • Buffers: shared hit=4,221 read=52,619
3. 1,309.828 1,309.828 ↑ 1.9 453,577 1

Seq Scan on estoques e (cost=0..61,905.02 rows=864,902 width=19) (actual time=0.027..1,309.828 rows=453,577 loops=1)

  • Buffers: shared hit=637 read=52,619
4. 65.248 437.077 ↑ 1.0 41,608 1

Hash (cost=89,540.38..89,540.38 rows=43,225 width=10) (actual time=437.077..437.077 rows=41,608 loops=1)

  • Buffers: shared hit=3,584
5. 144.516 371.829 ↑ 1.0 41,608 1

Sort (cost=89,000.07..89,108.13 rows=43,225 width=10) (actual time=312.353..371.829 rows=41,608 loops=1)

  • Sort Key: p.codigo, f.codigo
  • Sort Method: quicksort Memory: 3,316kB
  • Buffers: shared hit=3,584
6. 140.864 227.313 ↑ 1.0 41,608 1

Nested Loop (cost=319.04..85,671.84 rows=43,225 width=10) (actual time=2.59..227.313 rows=41,608 loops=1)

  • Buffers: shared hit=3,584
7. 13.142 15.121 ↑ 2.1 2,972 1

Bitmap Heap Scan on produtos p (cost=319.04..84,346.88 rows=6,175 width=12) (actual time=2.569..15.121 rows=2,972 loops=1)

  • Filter: (p.aparecernosite AND (NOT p.inativol))
  • Heap Blocks: exact=3,537
  • Buffers: shared hit=3,556
8. 1.979 1.979 ↑ 5.2 6,067 1

Bitmap Index Scan on produtos_gidx (cost=0..317.5 rows=31,631 width=0) (actual time=1.979..1.979 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=19
9. 71.247 71.328 ↑ 1.0 14 2,972

Materialize (cost=0..28.24 rows=14 width=2) (actual time=0.002..0.024 rows=14 loops=2,972)

  • Buffers: shared hit=28
10. 0.081 0.081 ↑ 1.0 14 1

Seq Scan on filiais f (cost=0..28.17 rows=14 width=2) (actual time=0.008..0.081 rows=14 loops=1)

  • Filter: f.estoque_site
  • Buffers: shared hit=28
Planning time : 0.948 ms
Execution time : 3,102.888 ms