QUERY PLAN
Finalize Aggregate (cost=11089.78..11089.79 rows=1 width=8)
-> Gather (cost=11089.67..11089.78 rows=1 width=8)
Workers Planned: 1
-> Partial Aggregate (cost=10089.67..10089.68 rows=1 width=8)
-> Nested Loop (cost=0.42..10089.13 rows=218 width=0)
-> Parallel Seq Scan on tbl_unread_comments uc (cost=0.00..3784.44 rows=1337 width=4)
Filter: ((NOT is_read) AND (remind_user_id = 1001))
-> Index Scan using tbl_comments_pkey on tbl_comments c (cost=0.42..4.72 rows=1 width=4)
Index Cond: (id = uc.comment_id)
Filter: (NOT is_system)