Aggregate (cost=11.04..11.05 rows=1 width=8) |
-> Sort (cost=11.03..11.03 rows=1 width=590) |
Sort Key: a.created_at DESC |
-> Nested Loop Anti Join (cost=0.27..11.02 rows=1 width=590) |
Join Filter: (l.id = r.user_id) |
-> Nested Loop Left Join (cost=0.00..2.71 rows=1 width=12) |
Join Filter: (a.id = r.announcement_id) |
-> Seq Scan on tbl_announcements a (cost=0.00..1.01 rows=1 width=12) |
Filter: (created_at > '2016-10-14 22:23:37+08'::timestamp with time zone) |
-> Seq Scan on tbl_read_announcement r (cost=0.00..1.69 rows=1 width=8) |
Filter: (user_id = 1000) |
-> Index Only Scan using tbl_logins_pkey on tbl_logins l (cost=0.27..8.29 rows=1 width=4) |
Index Cond: (id = 1000) |