explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aV4I

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=696,175.24..696,300.24 rows=50,000 width=1,226) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=696,175.24..696,365.99 rows=76,302 width=1,226) (actual rows= loops=)

  • Sort Key: d.partition_id
3. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,425.51..649,040.86 rows=76,302 width=1,226) (actual rows= loops=)

  • Hash Cond: (d.topic_id = t.id)
4. 0.000 0.000 ↓ 0.0

Hash Join (cost=690.66..647,256.86 rows=76,302 width=134) (actual rows= loops=)

  • Hash Cond: (d.partition_id = p.id)
5. 0.000 0.000 ↓ 0.0

Append (cost=0.00..630,849.85 rows=3,987,554 width=81) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Seq Scan on data d (cost=0.00..0.00 rows=1 width=81) (actual rows= loops=)

  • Filter: ((start_time <= '2019-07-19 07:06:24'::timestamp without time zone) AND (end_time >= '2019-07-19 07:01:24'::timestamp without time zone) AND (start_time >= '2019-07-19 02:01:24'::timestamp without time zone))
7. 0.000 0.000 ↓ 0.0

Index Scan using start_time_index_2019_07 on data_2019_07 d_1 (cost=0.58..630,849.85 rows=3,987,553 width=81) (actual rows= loops=)

  • Index Cond: ((start_time <= '2019-07-19 07:06:24'::timestamp without time zone) AND (start_time >= '2019-07-19 02:01:24'::timestamp without time zone))
  • Filter: (end_time >= '2019-07-19 07:01:24'::timestamp without time zone)
8. 0.000 0.000 ↓ 0.0

Hash (cost=684.94..684.94 rows=458 width=61) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on partition p (cost=12.99..684.94 rows=458 width=61) (actual rows= loops=)

  • Recheck Cond: (((bag_date)::text >= to_char('2019-07-18 07:01:24'::timestamp without time zone, 'YYYYMMDD'::text)) AND ((bag_date)::text <= to_char('2019-07-19 07:06:24'::timestamp without time zone, 'YYYYMMDD'::text)))
10. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on partition_bag_date_idx (cost=0.00..12.87 rows=458 width=0) (actual rows= loops=)

  • Index Cond: (((bag_date)::text >= to_char('2019-07-18 07:01:24'::timestamp without time zone, 'YYYYMMDD'::text)) AND ((bag_date)::text <= to_char('2019-07-19 07:06:24'::timestamp without time zone, 'YYYYMMDD'::text)))
11. 0.000 0.000 ↓ 0.0

Hash (cost=686.60..686.60 rows=3,860 width=1,108) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Seq Scan on topic t (cost=0.00..686.60 rows=3,860 width=1,108) (actual rows= loops=)