QUERY PLAN
Group (cost=1770.68..1771.02 rows=57 width=4)
Group Key: out_device
-> Sort (cost=1770.68..1770.85 rows=68 width=4)
Sort Key: out_device
-> Bitmap Heap Scan on tbl_punch (cost=1067.83..1768.61 rows=68 width=4)
Recheck Cond: (user_id = 5440)
Filter: (out_device IS NOT NULL)
-> Bitmap Index Scan on tbl_punch_pkey (cost=0.00..1067.81 rows=265 width=0)
Index Cond: (user_id = 5440)