Advertisement
Guest User

Untitled

a guest
May 23rd, 2012
1,201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. dfcjb17kf9jc98=> explain analyze SELECT "replays_game".*
  2. FROM "replays_game"
  3. INNER JOIN "replays_playeringame" ON "replays_game"."id" = "replays_playeringame"."game_id"
  4. WHERE "replays_playeringame"."player_id" = 50027 ;
  5.  
  6. QUERY PLAN
  7. --------------------------------------------------------------------------------------------------------------------------------------------------------------------
  8. Hash Join (cost=3085.57..7623.31 rows=3431 width=72) (actual time=714.068..764.712 rows=3398 loops=1)
  9. Hash Cond: (replays_playeringame.game_id = replays_game.id)
  10. -> Index Scan using replays_playeringame_player_id on replays_playeringame (cost=0.00..4518.02 rows=3431 width=4) (actual time=0.028..5.141 rows=3398 loops=1)
  11. Index Cond: (player_id = 50027)
  12. -> Hash (cost=2543.03..2543.03 rows=155010 width=72) (actual time=713.986..713.986 rows=158224 loops=1)
  13. Buckets: 16384 Batches: 1 Memory Usage: 14098kB
  14. -> Seq Scan on replays_game (cost=0.00..2543.03 rows=155010 width=72) (actual time=0.006..346.739 rows=158224 loops=1)
  15. Total runtime: 773.900 ms
  16. (8 rows)
  17.  
  18. dfcjb17kf9jc98=> show cpu_tuple_cost ;
  19. show cpu_tuple_cost ;
  20. cpu_tuple_cost
  21. ----------------
  22. 0.003
  23. (1 row)
  24.  
  25. dfcjb17kf9jc98=> set cpu_tuple_cost = 0.1 ;
  26. set cpu_tuple_cost = 0.1 ;
  27. SET
  28.  
  29. dfcjb17kf9jc98=> explain analyze SELECT "replays_game".*
  30. FROM "replays_game"
  31. INNER JOIN "replays_playeringame" ON "replays_game"."id" = "replays_playeringame"."game_id"
  32. WHERE "replays_playeringame"."player_id" = 50027 ;
  33. explain analyze SELECT "replays_game".*
  34.  
  35. QUERY PLAN
  36. --------------------------------------------------------------------------------------------------------------------------------------------------------------------
  37. Nested Loop (cost=0.00..10205.66 rows=3431 width=72) (actual time=0.057..26.408 rows=3398 loops=1)
  38. -> Index Scan using replays_playeringame_player_id on replays_playeringame (cost=0.00..4850.83 rows=3431 width=4) (actual time=0.027..5.151 rows=3398 loops=1)
  39. Index Cond: (player_id = 50027)
  40. -> Index Scan using replays_game_pkey on replays_game (cost=0.00..1.46 rows=1 width=72) (actual time=0.004..0.004 rows=1 loops=3398)
  41. Index Cond: (id = replays_playeringame.game_id)
  42. Total runtime: 27.714 ms
  43. (6 rows)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement