explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5DlA

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 47.006 ↑ 1.0 10 1

Limit (cost=2,155.72..2,155.76 rows=10 width=200) (actual time=46.992..47.006 rows=10 loops=1)

2. 0.034 47.002 ↑ 21.3 10 1

GroupAggregate (cost=2,155.72..2,156.57 rows=213 width=200) (actual time=46.990..47.002 rows=10 loops=1)

  • Group Key: tb_points.id_point
3. 6.307 46.968 ↑ 19.4 11 1

Sort (cost=2,155.72..2,155.78 rows=213 width=38) (actual time=46.968..46.968 rows=11 loops=1)

  • Sort Key: tb_points.id_point DESC
  • Sort Method: quicksort Memory: 2360kB
4. 5.422 40.661 ↓ 95.7 20,377 1

Nested Loop (cost=0.10..2,154.90 rows=213 width=38) (actual time=0.037..40.661 rows=20,377 loops=1)

5. 0.071 0.071 ↑ 1.0 1 1

Index Scan using tb_stock_cd_stock_text_idx on tb_stock (cost=0.04..0.44 rows=1 width=8) (actual time=0.021..0.071 rows=1 loops=1)

  • Index Cond: ((cd_stock)::text = 'PETR4'::text)
  • Filter: (id_exchange = 1)
6. 35.168 35.168 ↓ 1.9 20,377 1

Index Scan using tb_bar_five_minute_im_pk on tb_bar_five_minute tb_points (cost=0.06..2,143.85 rows=10,599 width=42) (actual time=0.015..35.168 rows=20,377 loops=1)

  • Index Cond: ((id_stock = tb_stock.id_stock) AND (id_point < '201911260000'::bigint))
Planning time : 0.497 ms
Execution time : 47.237 ms