pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jim C. Nasby <decibel@decibel.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: Odd number of rows expected
Date: Sat, 22 Jan 2005 22:18:00 -0500
Message-ID: <26465.1106450280@sss.pgh.pa.us> (raw)
In-Reply-To: <20050121203827.GW67721@decibel.org>
References: <20050121203827.GW67721@decibel.org>

"Jim C. Nasby" <decibel@decibel.org> writes:
>             (SELECT b.bucket_id AS rrs_bucket_id, s.*
>                 FROM rrs.bucket b
>                     JOIN page_log.log s
>                         ON (
>                             b.prev_end_time  < log_time
>                             AND b.end_time >= log_time )
>                 WHERE b.rrs_id = '1'
>                     AND b.end_time <= '2005-01-21 20:23:00+00'
>                     AND b.end_time > '1970-01-01 00:00:00+00'
>             ) a

> Basically, it seems that it doesn't understand that each row in log will
> match up with at most one row in bucket. There is a unique index on
> bucket(rrs_id, end_time), so it should be able to tell this.

Why should it be able to tell that?

			regards, tom lane



view thread (4+ messages)  latest in thread

Message-ID: <26465.1106450280@sss.pgh.pa.us>
Permalink:  ../26465.1106450280@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26465.1106450280@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-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, decibel@decibel.org
  Subject: Re: Odd number of rows expected
  In-Reply-To: <26465.1106450280@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