explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YUMF

Settings
# exclusive inclusive rows x rows loops node
1. 0.116 5.873 ↑ 4.2 10 1

GroupAggregate (cost=974.46..975.41 rows=42 width=52) (actual time=5.809..5.873 rows=10 loops=1)

  • Group Key: patientid
2. 0.087 5.757 ↓ 3.8 159 1

Sort (cost=974.46..974.57 rows=42 width=48) (actual time=5.742..5.757 rows=159 loops=1)

  • Sort Key: patientid
  • Sort Method: quicksort Memory: 38kB
3. 0.244 5.670 ↓ 3.8 159 1

Bitmap Heap Scan on patienttaskstatus patienttas0_ (cost=806.65..973.33 rows=42 width=48) (actual time=5.458..5.670 rows=159 loops=1)

  • Recheck Cond: ((patientid = ANY ('{512,2049,2311,2314,1162,64651,2316,64652,530,64658,404,277,789,1301,21,22,64668,1308,64669,64670,544,2219,1327,1200,947,2230,447,64838,1606,2121,841,2122,2123,1617,2006,1878,1112,64729,91,485,358,1897,64879,1397,502,12279,2296,1146,64893,2047}'::bigint[])) AND (assignedto = 2,088))
  • Filter: (isactive AND (statusid = ANY ('{53,57}'::integer[])))
  • Rows Removed by Filter: 15
  • Heap Blocks: exact=103
4. 0.079 5.426 ↓ 0.0 0 1

BitmapAnd (cost=806.65..806.65 rows=42 width=0) (actual time=5.426..5.426 rows=0 loops=1)

5. 0.431 0.431 ↑ 1.8 498 1

Bitmap Index Scan on index_patienttaskstatus_patientid (cost=0.00..228.00 rows=881 width=0) (actual time=0.431..0.431 rows=498 loops=1)

  • Index Cond: (patientid = ANY ('{512,2049,2311,2314,1162,64651,2316,64652,530,64658,404,277,789,1301,21,22,64668,1308,64669,64670,544,2219,1327,1200,947,2230,447,64838,1606,2121,841,2122,2123,1617,2006,1878,1112,64729,91,485,358,1897,64879,1397,502,12279,2296,1146,64893,2047}'::bigint[]))
6. 4.916 4.916 ↑ 1.0 30,797 1

Bitmap Index Scan on assignedto_ptstatus_i (cost=0.00..578.38 rows=31,194 width=0) (actual time=4.916..4.916 rows=30,797 loops=1)

  • Index Cond: (assignedto = 2,088)