Re: BUG #14302: SQL with LIMIT degrades performance seriously
От | Kaijiang Chen |
---|---|
Тема | Re: BUG #14302: SQL with LIMIT degrades performance seriously |
Дата | |
Msg-id | CAAkGvS8nLbnCJ2+PpfubVKSoUHaOYd0yBDZ1-2DOVA_Gq+1Uhg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #14302: SQL with LIMIT degrades performance seriously (Andrew Gierth <andrew@tao11.riddles.org.uk>) |
Ответы |
Re: BUG #14302: SQL with LIMIT degrades performance seriously
Re: BUG #14302: SQL with LIMIT degrades performance seriously |
Список | pgsql-bugs |
It couldn't solve the problem. I've already created 2 btree indexes, one for parent_id, the other for user_id. Do you mean to create an multi-column index on (parent_id, user_id)? -- still couldn't solve the problem, since we still need index for user_id (for other sql) and planner will turn to user_id index. On Wed, Aug 31, 2016 at 1:01 PM, Andrew Gierth <andrew@tao11.riddles.org.uk> wrote: > >>>>> "Kaijiang" == Kaijiang Chen <chenkaijiang@gmail.com> writes: > > Kaijiang> Thank you very much for your quick response! > > Kaijiang> So I know I have to deal with my own solutions. Fortunately, > Kaijiang> I got the solution with the "WITH" clause: > > Why not just create the correct index on each partition? > (parent_id,user_id) > > -- > Andrew (irc:RhodiumToad) >
В списке pgsql-bugs по дате отправления: