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)
>