Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. SELECT * FROM "entry"
  2. INNER JOIN "entrytag" ON ("entry"."id" = "entrytag"."entry_id")
  3. WHERE "entrytag"."tag_id" = 323456
  4. ORDER BY "entry"."date"
  5. DESC LIMIT 10'
  6.  
  7. ('Limit (cost=1241.85..1241.87 rows=10 width=666) (actual time=23576.449..23576.454 rows=10 loops=1)'
  8. ' -> Sort (cost=1241.85..1242.10 rows=99 width=666) (actual time=23576.446..23576.447 rows=10 loops=1)'
  9. ' Sort Key: entry.date DESC'
  10. ' Sort Method: top-N heapsort Memory: 31kB'
  11. ' -> Nested Loop (cost=0.87..1239.71 rows=99 width=666) (actual time=0.168..22494.187 rows=989105 loops=1)'
  12. ' -> Index Scan using entrytag_tag_id_row_idx on entrytag (cost=0.44..402.17 rows=99 width=4)
  13. ' (actual time=0.093..535.664 **rows=989105** loops=1)'
  14. ' Index Cond: (tag_id = 323456)'
  15. ' -> Index Scan using entry_pkey on entry (cost=0.43..8.45 rows=1 width=666)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement