Re: separating improperly grouped page views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Frost <jeff(at)frostconsultingllc(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: separating improperly grouped page views
Date: 2007-06-18 05:54:53
Message-ID: 2169.1182146093@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Jeff Frost <jeff(at)frostconsultingllc(dot)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=431 width=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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jeff Frost 2007-06-18 06:11:11 Re: separating improperly grouped page views
Previous Message Jeff Frost 2007-06-18 05:16:36 separating improperly grouped page views