explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GnDU

Settings
# exclusive inclusive rows x rows loops node
1. 2,266.069 6,522.086 ↑ 580.4 5,407 1

GroupAggregate (cost=5.62..1,521,981.14 rows=3,137,953 width=232) (actual time=10.227..6,522.086 rows=5,407 loops=1)

  • Group Key: tskv.tenant_id, tskv.entity_id, tskv.key, (time_bucket('3600000'::bigint, tskv.ts))
  • Buffers: shared hit=122876
2. 793.709 4,256.017 ↓ 1.0 3,757,276 1

Result (cost=5.62..1,402,120.12 rows=3,639,586 width=96) (actual time=7.241..4,256.017 rows=3,757,276 loops=1)

  • Buffers: shared hit=122876
3. 1,009.819 3,462.308 ↓ 1.0 3,757,276 1

Merge Append (cost=5.62..1,356,625.30 rows=3,639,586 width=96) (actual time=7.238..3,462.308 rows=3,757,276 loops=1)

  • Sort Key: tskv.key, (time_bucket('3600000'::bigint, tskv.ts))
  • Buffers: shared hit=122876
4. 322.684 322.684 ↓ 1.1 535,642 1

Index Scan using "120_103_tenant_ts_kv_pkey_3" on _hyper_18_120_chunk tskv (cost=0.69..176,408.39 rows=508,937 width=96) (actual time=0.087..322.684 rows=535,642 loops=1)

  • Index Cond: (((tenant_id)::text = '1e9f663dca0c63086316707b6318814'::text) AND ((entity_id)::text = '1ea1811115e12f0ab17e97c001f15b8'::text) AND (ts > '1580158800000'::bigint) AND (ts <= '1580765400000'::bigint))
  • Buffers: shared hit=16535
5. 321.271 321.271 ↓ 1.1 535,673 1

Index Scan using "119_102_tenant_ts_kv_pkey_3" on _hyper_18_119_chunk tskv_1 (cost=0.69..175,743.02 rows=506,091 width=96) (actual time=0.074..321.271 rows=535,673 loops=1)

  • Index Cond: (((tenant_id)::text = '1e9f663dca0c63086316707b6318814'::text) AND ((entity_id)::text = '1ea1811115e12f0ab17e97c001f15b8'::text) AND (ts > '1580158800000'::bigint) AND (ts <= '1580765400000'::bigint))
  • Buffers: shared hit=16536
6. 295.728 295.728 ↑ 1.0 476,244 1

Index Scan using "121_104_tenant_ts_kv_pkey_3" on _hyper_18_121_chunk tskv_2 (cost=0.69..169,156.12 rows=476,300 width=96) (actual time=0.077..295.728 rows=476,244 loops=1)

  • Index Cond: (((tenant_id)::text = '1e9f663dca0c63086316707b6318814'::text) AND ((entity_id)::text = '1ea1811115e12f0ab17e97c001f15b8'::text) AND (ts > '1580158800000'::bigint) AND (ts <= '1580765400000'::bigint))
  • Buffers: shared hit=15387
7. 335.879 335.879 ↓ 1.1 535,673 1

Index Scan using "111_100_tenant_ts_kv_pkey_3" on _hyper_18_111_chunk tskv_3 (cost=0.69..176,356.39 rows=508,724 width=96) (actual time=0.052..335.879 rows=535,673 loops=1)

  • Index Cond: (((tenant_id)::text = '1e9f663dca0c63086316707b6318814'::text) AND ((entity_id)::text = '1ea1811115e12f0ab17e97c001f15b8'::text) AND (ts > '1580158800000'::bigint) AND (ts <= '1580765400000'::bigint))
  • Buffers: shared hit=16536
8. 154.067 154.067 ↓ 1.0 66,963 1

Index Scan using "108_97_tenant_ts_kv_pkey_3" on _hyper_18_108_chunk tskv_4 (cost=0.69..46,332.38 rows=65,388 width=96) (actual time=6.723..154.067 rows=66,963 loops=1)

  • Index Cond: (((tenant_id)::text = '1e9f663dca0c63086316707b6318814'::text) AND ((entity_id)::text = '1ea1811115e12f0ab17e97c001f15b8'::text) AND (ts > '1580158800000'::bigint) AND (ts <= '1580765400000'::bigint))
  • Buffers: shared hit=8272
9. 338.322 338.322 ↓ 1.0 535,704 1

Index Scan using "109_98_tenant_ts_kv_pkey_3" on _hyper_18_109_chunk tskv_5 (cost=0.69..179,048.75 rows=517,786 width=96) (actual time=0.081..338.322 rows=535,704 loops=1)

  • Index Cond: (((tenant_id)::text = '1e9f663dca0c63086316707b6318814'::text) AND ((entity_id)::text = '1ea1811115e12f0ab17e97c001f15b8'::text) AND (ts > '1580158800000'::bigint) AND (ts <= '1580765400000'::bigint))
  • Buffers: shared hit=16537
10. 339.620 339.620 ↓ 1.1 535,673 1

Index Scan using "112_101_tenant_ts_kv_pkey_3" on _hyper_18_112_chunk tskv_6 (cost=0.69..175,049.66 rows=503,149 width=96) (actual time=0.074..339.620 rows=535,673 loops=1)

  • Index Cond: (((tenant_id)::text = '1e9f663dca0c63086316707b6318814'::text) AND ((entity_id)::text = '1ea1811115e12f0ab17e97c001f15b8'::text) AND (ts > '1580158800000'::bigint) AND (ts <= '1580765400000'::bigint))
  • Buffers: shared hit=16536
11. 344.918 344.918 ↑ 1.0 535,704 1

Index Scan using "110_99_tenant_ts_kv_pkey_3" on _hyper_18_110_chunk tskv_7 (cost=0.69..185,738.74 rows=553,211 width=96) (actual time=0.062..344.918 rows=535,704 loops=1)

  • Index Cond: (((tenant_id)::text = '1e9f663dca0c63086316707b6318814'::text) AND ((entity_id)::text = '1ea1811115e12f0ab17e97c001f15b8'::text) AND (ts > '1580158800000'::bigint) AND (ts <= '1580765400000'::bigint))
  • Buffers: shared hit=16537
Planning time : 3.757 ms
Execution time : 6,522.945 ms