explain.depesz.com

PostgreSQL's explain analyze made readable

Result: C8fS

Settings
# exclusive inclusive rows x rows loops node
1. 327.303 9,427.918 ↑ 8.2 2,972 1

GroupAggregate (cost=253,933.91..270,237.68 rows=24,498 width=17) (actual time=4,534.852..9,427.918 rows=2,972 loops=1)

  • Group Key: e.produto
  • Buffers: shared hit=5,983 read=50,857, temp read=1,630 written=1,676
2. 2,105.723 9,100.615 ↑ 20.8 41,608 1

Merge Join (cost=253,933.91..261,282.44 rows=864,902 width=17) (actual time=4,511.432..9,100.615 rows=41,608 loops=1)

  • Buffers: shared hit=5,983 read=50,857, temp read=1,630 written=1,676
3. 4,105.962 5,889.974 ↑ 2.0 429,931 1

Sort (cost=164,931.77..167,094.03 rows=864,902 width=19) (actual time=3,729.107..5,889.974 rows=429,931 loops=1)

  • Sort Key: e.produto, e.filial
  • Sort Method: external merge Disk: 13,352kB
  • Buffers: shared hit=4,408 read=48,848, temp read=1,630 written=1,676
4. 1,784.012 1,784.012 ↑ 1.9 453,577 1

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

  • Buffers: shared hit=4,408 read=48,848
5. 407.962 1,104.918 ↑ 1.0 41,608 1

Materialize (cost=89,000.07..89,648.44 rows=43,225 width=10) (actual time=536.433..1,104.918 rows=41,608 loops=1)

  • Buffers: shared hit=1,575 read=2,009
6. 299.419 696.956 ↑ 1.0 41,608 1

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

  • Sort Key: p.codigo, f.codigo
  • Sort Method: quicksort Memory: 3,316kB
  • Buffers: shared hit=1,575 read=2,009
7. 219.052 397.537 ↑ 1.0 41,608 1

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

  • Buffers: shared hit=1,575 read=2,009
8. 48.514 50.689 ↑ 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.777..50.689 rows=2,972 loops=1)

  • Filter: (p.aparecernosite AND (NOT p.inativol))
  • Heap Blocks: exact=3,537
  • Buffers: shared hit=1,547 read=2,009
9. 2.175 2.175 ↑ 5.2 6,067 1

Bitmap Index Scan on produtos_gidx (cost=0..317.5 rows=31,631 width=0) (actual time=2.175..2.175 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=16
10. 127.711 127.796 ↑ 1.0 14 2,972

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

  • Buffers: shared hit=28
11. 0.085 0.085 ↑ 1.0 14 1

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

  • Filter: f.estoque_site
  • Buffers: shared hit=28
Planning time : 1.241 ms
Execution time : 9,440.156 ms