explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 23r

Settings
# exclusive inclusive rows x rows loops node
1. 90.611 4,458.773 ↑ 8.2 2,972 1

GroupAggregate (cost=254,399.88..270,703.65 rows=24,498 width=17) (actual time=2,639.118..4,458.773 rows=2,972 loops=1)

  • Group Key: e.produto
  • Buffers: shared hit=3,679 read=53,161 dirtied=1, temp read=1,630 written=1,676
2. 826.932 4,368.162 ↑ 20.8 41,608 1

Merge Join (cost=254,399.88..261,748.41 rows=864,902 width=17) (actual time=2,626.575..4,368.162 rows=41,608 loops=1)

  • Buffers: shared hit=3,679 read=53,161 dirtied=1, temp read=1,630 written=1,676
3. 1,971.134 3,032.023 ↑ 2.0 429,931 1

Sort (cost=164,931.77..167,094.03 rows=864,902 width=19) (actual time=2,164.701..3,032.023 rows=429,931 loops=1)

  • Sort Key: e.produto, e.filial
  • Sort Method: external merge Disk: 13,352kB
  • Buffers: shared hit=3,176 read=50,080 dirtied=1, temp read=1,630 written=1,676
4. 1,060.889 1,060.889 ↑ 1.9 453,577 1

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

  • Buffers: shared hit=3,176 read=50,080 dirtied=1
5. 122.106 509.207 ↑ 1.0 41,608 1

Materialize (cost=89,466.04..90,114.42 rows=43,225 width=10) (actual time=325.451..509.207 rows=41,608 loops=1)

  • Buffers: shared hit=503 read=3,081
6. 140.933 387.101 ↑ 1.0 41,608 1

Sort (cost=89,466.04..89,574.1 rows=43,225 width=10) (actual time=325.443..387.101 rows=41,608 loops=1)

  • Sort Key: p.codigo, f.codigo
  • Sort Method: quicksort Memory: 3,316kB
  • Buffers: shared hit=503 read=3,081
7. 134.705 246.168 ↑ 1.0 41,608 1

Nested Loop (cost=84,735.67..86,137.81 rows=43,225 width=10) (actual time=41.492..246.168 rows=41,608 loops=1)

  • Buffers: shared hit=503 read=3,081
8. 9.825 46.079 ↑ 2.1 2,972 1

Sort (cost=84,735.67..84,751.1 rows=6,175 width=12) (actual time=41.465..46.079 rows=2,972 loops=1)

  • Sort Key: p.codigo
  • Sort Method: quicksort Memory: 236kB
  • Buffers: shared hit=475 read=3,081
9. 34.830 36.254 ↑ 2.1 2,972 1

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

  • Filter: (p.aparecernosite AND (NOT p.inativol))
  • Heap Blocks: exact=3,537
  • Buffers: shared hit=475 read=3,081
10. 1.424 1.424 ↑ 5.2 6,067 1

Bitmap Index Scan on produtos_gidx (cost=0..317.5 rows=31,631 width=0) (actual time=1.424..1.424 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=7 read=12
11. 65.319 65.384 ↑ 1.0 14 2,972

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

  • Buffers: shared hit=28
12. 0.065 0.065 ↑ 1.0 14 1

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

  • Filter: f.estoque_site
  • Buffers: shared hit=28
Planning time : 0.742 ms
Execution time : 4,467.403 ms