From: | Kaijiang Chen <chenkaijiang(at)gmail(dot)com> |
---|---|
To: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
Cc: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14302: SQL with LIMIT degrades performance seriously |
Date: | 2016-08-31 12:42:06 |
Message-ID: | CAAkGvS8nLbnCJ2+PpfubVKSoUHaOYd0yBDZ1-2DOVA_Gq+1Uhg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)tao11(dot)riddles(dot)org(dot)uk>
wrote:
> >>>>> "Kaijiang" == Kaijiang Chen <chenkaijiang(at)gmail(dot)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)
>
From | Date | Subject | |
---|---|---|---|
Next Message | Francisco Olarte | 2016-08-31 13:55:30 | Re: BUG #14302: SQL with LIMIT degrades performance seriously |
Previous Message | Christoph Berg | 2016-08-31 09:35:27 | Re: Re: [BUGS] BUG #14299: initdb and man pages are not installed in the alternatives system |