QUERY PLAN
Bitmap Heap Scan on tbl_work_logs w (cost=575.80..2738.78 rows=4 width=20)
Recheck Cond: ((created_by = ANY ('{1000,1001,1004,1005,1011,1013,1015,1017,1022,1023,5016,5064,5085,5087,5248,5250,5252,5295,5296,5300,5311,5329,5332,5360,5388,5404,5420,5440,5445,5446}'::integer[])) AND (created_by = ANY ('{1004,5087,5420,5404,5300,1005,5332,5329,5295}'::integer[])))
Filter: ((NOT is_draft) AND ((start_at IS NOT NULL) OR (end_at IS NOT NULL)) AND (((start_at >= '2025-07-01 00:00:00+08'::timestamp with time zone) AND (end_at < '2025-07-31 00:00:00+08'::timestamp with time zone)) OR ((start_at <= '2025-07-01 00:00:00+08'::timestamp with time zone) AND (end_at > '2025-07-01 00:00:00+08'::timestamp with time zone)) OR ((start_at <= '2025-07-31 00:00:00+08'::timestamp with time zone) AND (end_at > '2025-07-31 00:00:00+08'::timestamp with time zone))))
-> Bitmap Index Scan on tbl_work_logs_created_by_idx (cost=0.00..575.80 rows=12054 width=0)
Index Cond: ((created_by = ANY ('{1000,1001,1004,1005,1011,1013,1015,1017,1022,1023,5016,5064,5085,5087,5248,5250,5252,5295,5296,5300,5311,5329,5332,5360,5388,5404,5420,5440,5445,5446}'::integer[])) AND (created_by = ANY ('{1004,5087,5420,5404,5300,1005,5332,5329,5295}'::integer[])))