On Fri, Jun 21, 2013 at 9:08 AM, bricklen wrote:
> Did you try an index on (type, ts desc) ? I don't have much else to add at
> this point, but maybe after posting some more server and table (parent and
> child) details someone will have an answer for you.
>
No, this is exactly what I was missin
On Thu, Jun 20, 2013 at 10:14 PM, Maciek Sakrejda wrote:
> On Thu, Jun 20, 2013 at 9:13 PM, bricklen wrote:
>
>>
>> On Thu, Jun 20, 2013 at 6:24 PM, Maciek Sakrejda wrote:
>>
>>> SELECT
>>> DISTINCT ON (type) ts, type, details
>>> FROM
>>> observations
>>> WHERE
>>> subject = '...'
>>> ORDE
On Thu, Jun 20, 2013 at 9:13 PM, bricklen wrote:
>
> On Thu, Jun 20, 2013 at 6:24 PM, Maciek Sakrejda wrote:
>
>> SELECT
>> DISTINCT ON (type) ts, type, details
>> FROM
>> observations
>> WHERE
>> subject = '...'
>> ORDER BY
>> type, ts DESC;
>>
>
> First thing: What is your "work_mem" se
On Thu, Jun 20, 2013 at 6:24 PM, Maciek Sakrejda wrote:
> SELECT
> DISTINCT ON (type) ts, type, details
> FROM
> observations
> WHERE
> subject = '...'
> ORDER BY
> type, ts DESC;
>
First thing: What is your "work_mem" set to, and how much RAM is in the
machine? If you look at the plan, y