QUERY PLAN
Limit (cost=1475.17..1475.22 rows=20 width=432)
-> Sort (cost=1475.17..1476.75 rows=634 width=432)
Sort Key: r.created_at DESC
-> Hash Right Join (cost=223.33..1458.30 rows=634 width=432)
Hash Cond: (dt1.object_id = r.id)
-> Seq Scan on tbl_term_taxonomy_relationships dt1 (cost=0.00..1229.41 rows=2118 width=4)
Filter: (term_id = 17)
-> Hash (cost=215.40..215.40 rows=634 width=432)
-> Seq Scan on tbl_approves r (cost=0.00..215.40 rows=634 width=432)
Filter: ((status <> 0) AND (created_at >= '2025-01-01 00:00:00+08'::timestamp with time zone) AND (created_at <= '2025-12-31 23:59:59+08'::timestamp with time zone) AND ((status = '1'::smallint) OR (status = '2'::smallint)) AND (created_by = ANY ('{1000,1001,1004,1005,1011,1013,1015,1022,1023,5016,5064,5085,5087,5248,5250,5252,5295,5300,5311,5332,5360,5388,5446,5449}'::integer[])))