explain.depesz.com

PostgreSQL's explain analyze made readable

Result: y0jm

Settings
# exclusive inclusive rows x rows loops node
1. 6.207 314.891 ↓ 12.0 12 1

GroupAggregate (cost=1,413.49..1,413.53 rows=1 width=120) (actual time=307.794..314.891 rows=12 loops=1)

  • Group Key: year, month, orgunit_name, orgunit_id, product_id, product_name
2. 9.513 308.684 ↓ 18,252.0 18,252 1

Sort (cost=1,413.49..1,413.50 rows=1 width=120) (actual time=307.170..308.684 rows=18,252 loops=1)

  • Sort Key: year, month, orgunit_name, product_name
  • Sort Method: quicksort Memory: 3152kB
3. 199.490 299.171 ↓ 18,252.0 18,252 1

Bitmap Heap Scan on orgunit_customer_product_view ocpv (cost=925.46..1,413.48 rows=1 width=120) (actual time=101.957..299.171 rows=18,252 loops=1)

  • Recheck Cond: ((orgunit_id = 10) AND (product_id = 4))
  • Rows Removed by Index Recheck: 1153365
  • Filter: (((year = 2019) AND (month <= 10)) OR ((year = 2018) AND (month >= 11)))
  • Rows Removed by Filter: 18252
  • Heap Blocks: exact=9060 lossy=33275
4. 10.906 99.681 ↓ 0.0 0 1

BitmapAnd (cost=925.46..925.46 rows=124 width=0) (actual time=99.681..99.681 rows=0 loops=1)

5. 65.268 65.268 ↓ 25.0 620,568 1

Bitmap Index Scan on temp_ocp_view_orgunit_id_idx (cost=0.00..462.61 rows=24,823 width=0) (actual time=65.268..65.268 rows=620,568 loops=1)

  • Index Cond: (orgunit_id = 10)
6. 23.507 23.507 ↓ 11.8 292,032 1

Bitmap Index Scan on temp_ocp_view_product_id_idx (cost=0.00..462.61 rows=24,823 width=0) (actual time=23.507..23.507 rows=292,032 loops=1)

  • Index Cond: (product_id = 4)
Planning time : 0.187 ms