Skip site navigation (1) Skip section navigation (2)

Re: Odd number of rows expected

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Odd number of rows expected
Date: 2005-01-23 03:18:00
Message-ID: 26465.1106450280@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
"Jim C. Nasby" <decibel(at)decibel(dot)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

In response to

Responses

pgsql-performance by date

Next:From: Christopher BrowneDate: 2005-01-23 05:41:22
Subject: Re: PostgreSQL clustering VS MySQL clustering
Previous:From: Tom LaneDate: 2005-01-22 21:10:23
Subject: Re: PostgreSQL clustering VS MySQL clustering

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group