pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Frost <jeff@frostconsultingllc.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: separating improperly grouped page views
Date: Mon, 18 Jun 2007 01:54:53 -0400
Message-ID: <2169.1182146093@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.64.0706172157410.14506@discord.home.frostconsultingllc.com>
References: <Pine.LNX.4.64.0706172157410.14506@discord.home.frostconsultingllc.com>

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



view thread (5+ messages)  latest in thread

Message-ID: <2169.1182146093@sss.pgh.pa.us>
Permalink:  ../2169.1182146093@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2169.1182146093@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jeff@frostconsultingllc.com
  Subject: Re: separating improperly grouped page views
  In-Reply-To: <2169.1182146093@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox