| From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
|---|---|
| To: | Randall Skelton <skelton(at)atm(dot)ox(dot)ac(dot)uk> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Join with equals? |
| Date: | 2004-02-20 22:56:22 |
| Message-ID: | 20040220225622.GC28711@svana.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Wed, Feb 18, 2004 at 11:58:24AM -0500, Randall Skelton wrote:
> Greetings all,
>
> I am trying to do what should be a simple join but the tables are very
> large and it is taking a long, long time. I have the feeling that I
> have stuffed up something in the syntax.
>
> Here is what I have:
>
> telemetry=> select (tq1.timestamp = tq2.timestamp) as timestamp,
> tq1.value as q1, tq2.value as q2 from cal_quat_1 tq1 inner join
> cal_quat_2 as tq2 using (timestamp) where timestamp > '2004-01-12
> 09:47:56.0000 +0' and timestamp < '2004-01-12 09:50:44.7187 +0' order
> by timestamp;
Please run ANALYZE and then send the EXPLAIN ANALYZE <query> output.
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> If the Catholic church can survive the printing press, science fiction
> will certainly weather the advent of bookwarez.
> http://craphound.com/ebooksneitherenorbooks.txt - Cory Doctorow
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chris Browne | 2004-02-20 23:33:25 | Re: embeding postgreSQL |
| Previous Message | Martijn van Oosterhout | 2004-02-20 22:51:20 | Re: Cascade delete triggers change user credentials |