Re: separating improperly grouped page views - Mailing list pgsql-sql

From Tom Lane
Subject Re: separating improperly grouped page views
Date
Msg-id 2169.1182146093@sss.pgh.pa.us
Whole thread Raw
In response to separating improperly grouped page views  (Jeff Frost <jeff@frostconsultingllc.com>)
Responses Re: separating improperly grouped page views  (Jeff Frost <jeff@frostconsultingllc.com>)
List pgsql-sql
Jeff Frost <jeff@frostconsultingllc.com> writes:
> [ umpteen million iterations of: ]
>               ->  Limit  (cost=0.00..367.09 rows=1 width=8)
>                     ->  Index Scan Backward using page_view_stamp_idx on page_view pv2  (cost=0.00..158215.86
rows=431width=8)
 
>                           Index Cond: (stamp < $1)
>                           Filter: ((stamp IS NOT NULL) AND (visit_id = $0))

Perhaps an index on (visit_id, stamp) would help.  This one is doing the
best it can, but if the visit_id's you want are thinly scattered, it'll
still suck...
        regards, tom lane


pgsql-sql by date:

Previous
From: Jeff Frost
Date:
Subject: separating improperly grouped page views
Next
From: Jeff Frost
Date:
Subject: Re: separating improperly grouped page views