| Limit (cost=12969.91..12979.48 rows=82 width=157) |
| -> Gather Merge (cost=12969.91..12979.48 rows=82 width=157) |
| Workers Planned: 2 |
| -> Sort (cost=11969.89..11969.99 rows=41 width=157) |
| Sort Key: (CASE WHEN ((c.created_by = 1000) OR uc.is_read) THEN true ELSE false END), c.created_at DESC |
| -> Merge Left Join (cost=11893.85..11968.79 rows=41 width=157) |
| Merge Cond: (c.id = uc.comment_id) |
| Filter: ((uc.remind_user_id = 1000) OR (c.created_by = 1000)) |
| -> Sort (cost=6673.44..6709.43 rows=14399 width=152) |
| Sort Key: c.id |
| -> Parallel Seq Scan on tbl_comments c (cost=0.00..5678.92 rows=14399 width=152) |
| Filter: (NOT is_system) |
| -> Sort (cost=5220.41..5221.59 rows=472 width=9) |
| Sort Key: uc.comment_id |
| -> Seq Scan on tbl_unread_comments uc (cost=0.00..5199.45 rows=472 width=9) |
| Filter: (remind_user_id = 1000) |