Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dfcjb17kf9jc98=> explain analyze SELECT "replays_game".*
- FROM "replays_game"
- INNER JOIN "replays_playeringame" ON "replays_game"."id" = "replays_playeringame"."game_id"
- WHERE "replays_playeringame"."player_id" = 50027 ;
- QUERY PLAN
- --------------------------------------------------------------------------------------------------------------------------------------------------------------------
- Hash Join (cost=3085.57..7623.31 rows=3431 width=72) (actual time=714.068..764.712 rows=3398 loops=1)
- Hash Cond: (replays_playeringame.game_id = replays_game.id)
- -> 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)
- Index Cond: (player_id = 50027)
- -> Hash (cost=2543.03..2543.03 rows=155010 width=72) (actual time=713.986..713.986 rows=158224 loops=1)
- Buckets: 16384 Batches: 1 Memory Usage: 14098kB
- -> Seq Scan on replays_game (cost=0.00..2543.03 rows=155010 width=72) (actual time=0.006..346.739 rows=158224 loops=1)
- Total runtime: 773.900 ms
- (8 rows)
- dfcjb17kf9jc98=> show cpu_tuple_cost ;
- show cpu_tuple_cost ;
- cpu_tuple_cost
- ----------------
- 0.003
- (1 row)
- dfcjb17kf9jc98=> set cpu_tuple_cost = 0.1 ;
- set cpu_tuple_cost = 0.1 ;
- SET
- dfcjb17kf9jc98=> explain analyze SELECT "replays_game".*
- FROM "replays_game"
- INNER JOIN "replays_playeringame" ON "replays_game"."id" = "replays_playeringame"."game_id"
- WHERE "replays_playeringame"."player_id" = 50027 ;
- explain analyze SELECT "replays_game".*
- QUERY PLAN
- --------------------------------------------------------------------------------------------------------------------------------------------------------------------
- Nested Loop (cost=0.00..10205.66 rows=3431 width=72) (actual time=0.057..26.408 rows=3398 loops=1)
- -> 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)
- Index Cond: (player_id = 50027)
- -> 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)
- Index Cond: (id = replays_playeringame.game_id)
- Total runtime: 27.714 ms
- (6 rows)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement