Re: Nested query performance issue
| От | Glenn Maynard |
|---|---|
| Тема | Re: Nested query performance issue |
| Дата | |
| Msg-id | d18085b50904081454q73260e6ai5f71b1e89e57208f@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Nested query performance issue (Віталій Тимчишин <tivv00@gmail.com>) |
| Ответы |
Re: Nested query performance issue
|
| Список | pgsql-performance |
(I didn't notice that I ended up with "score.score" in this test case. Oops.) 2009/4/8 Віталій Тимчишин <tivv00@gmail.com>: > How about > > select s1.* > from score s1 join score s2 on s1.game_id=s2.game_id and s2.score >= > s1.score > group by s1.* > having count(s2.*) <= N I can see what this is doing, but I'm getting: ERROR: could not identify an ordering operator for type score HINT: Use an explicit ordering operator or modify the query. I'm not sure why; if I replace s1.* and s2.* with s1.id and s2.id it works, but then I only get IDs. Unfortunately, with N = 1 this takes 8100ms (vs. 950ms and 25ms)... -- Glenn Maynard
В списке pgsql-performance по дате отправления: