From: | Ladislav Lenart <lenartlad(at)volny(dot)cz> |
---|---|
To: | Jonathan Vanasco <postgres(at)2xlp(dot)com>, PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: newsfeed type query |
Date: | 2015-04-30 18:05:30 |
Message-ID: | 55426EEA.5060608@volny.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 30.4.2015 19:08, Jonathan Vanasco wrote:
>
> On Apr 29, 2015, at 6:50 PM, Jim Nasby wrote:
>
>> Only because you're using UNION. Use UNION ALL instead.
>
> The difference between "union" and "union all" was negligible. the problem was
> in the subselect and the sheer size of the tables, even when we could handle it
> as an index-only scan.
>
>
> On Apr 29, 2015, at 1:18 PM, Ladislav Lenart wrote:
>
>> I would expect the overall query to return only 60F nad 55F as the most recent
>> data. No? You expect it to return 4 items when the LIMIT is only 2. Remember
>> that the overall query should be also ordered by ts and limited to 2.
>
> You're right. total mistake on my part and confusion with that. I got this
> query confused with the specifics of a similar one.
OK :-) Have you managed to solve the problem then? I am interested in your final
solution.
Thank you,
Ladislav Lenart
From | Date | Subject | |
---|---|---|---|
Next Message | Melvin Davidson | 2015-04-30 18:14:33 | Re: Partition Help |
Previous Message | Jonathan Vanasco | 2015-04-30 17:08:19 | Re: newsfeed type query |