explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TiZE

Settings
# exclusive inclusive rows x rows loops node
1. 0.513 16.077 ↓ 52.8 264 1

Sort (cost=401.41..401.41 rows=5 width=258) (actual time=16.067..16.077 rows=264 loops=1)

  • Sort Key: tb_company_position_sector.id_company_position_sector, tb_company_position_subsector.id_company_position_subsector, tb_company_position_segment.id_company_position_segment, tb_stock.volume DESC
  • Sort Method: quicksort Memory: 92kB
2. 0.241 15.564 ↓ 52.8 264 1

Nested Loop Left Join (cost=228.16..401.40 rows=5 width=258) (actual time=11.005..15.564 rows=264 loops=1)

3. 0.032 15.059 ↓ 52.8 264 1

Nested Loop Left Join (cost=228.14..401.25 rows=5 width=147) (actual time=10.990..15.059 rows=264 loops=1)

4. 0.072 14.763 ↓ 52.8 264 1

Nested Loop Left Join (cost=228.13..401.14 rows=5 width=91) (actual time=10.983..14.763 rows=264 loops=1)

5. 0.122 14.427 ↓ 52.8 264 1

Hash Join (cost=228.12..401.05 rows=5 width=34) (actual time=10.968..14.427 rows=264 loops=1)

  • Hash Cond: (tb_stock.id_company = tb_company_position.id_company)
6. 3.508 14.196 ↓ 22.7 431 1

Bitmap Heap Scan on tb_stock (cost=226.00..398.92 rows=19 width=34) (actual time=10.851..14.196 rows=431 loops=1)

  • Recheck Cond: ((cd_segment = '01'::bpchar) AND (cd_status_stock = 'A'::bpchar))
  • Filter: ((vl_volume_month >= '5000000'::numeric) AND (id_exchange = 1))
  • Rows Removed by Filter: 1,540
  • Heap Blocks: exact=1,246
7. 0.189 10.688 ↓ 0.0 0 1

BitmapAnd (cost=226.00..226.00 rows=861 width=0) (actual time=10.688..10.688 rows=0 loops=1)

8. 0.946 0.946 ↑ 1.2 3,875 1

Bitmap Index Scan on tb_stock_crypto_segment_qt_trades_idx (cost=0.00..24.41 rows=4,487 width=0) (actual time=0.946..0.946 rows=3,875 loops=1)

  • Index Cond: (cd_segment = '01'::bpchar)
9. 9.553 9.553 ↑ 1.1 105,916 1

Bitmap Index Scan on tb_stock_search_rank_idx (cost=0.00..201.57 rows=114,835 width=0) (actual time=9.553..9.553 rows=105,916 loops=1)

  • Index Cond: (cd_status_stock = 'A'::bpchar)
10. 0.041 0.109 ↑ 1.0 406 1

Hash (cost=1.61..1.61 rows=406 width=8) (actual time=0.109..0.109 rows=406 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 24kB
11. 0.068 0.068 ↑ 1.0 406 1

Seq Scan on tb_company_position (cost=0.00..1.61 rows=406 width=8) (actual time=0.006..0.068 rows=406 loops=1)

12. 0.264 0.264 ↑ 1.0 1 264

Index Scan using tb_company_position_segment_pk on tb_company_position_segment (cost=0.01..0.02 rows=1 width=61) (actual time=0.001..0.001 rows=1 loops=264)

  • Index Cond: (id_company_position_segment = tb_company_position.id_company_position_segment)
13. 0.264 0.264 ↑ 1.0 1 264

Index Scan using tb_company_position_subsector_pk on tb_company_position_subsector (cost=0.01..0.02 rows=1 width=60) (actual time=0.001..0.001 rows=1 loops=264)

  • Index Cond: (id_company_position_subsector = tb_company_position_segment.id_company_position_subsector)
14. 0.264 0.264 ↑ 1.0 1 264

Index Scan using tb_company_position_sector_pk on tb_company_position_sector (cost=0.01..0.03 rows=1 width=68) (actual time=0.001..0.001 rows=1 loops=264)

  • Index Cond: (id_company_position_sector = tb_company_position_subsector.id_company_position_sector)
Planning time : 0.571 ms
Execution time : 16.172 ms