From: John A Meinel <john@arbash-meinel.com>
To: Tobias Brox <tobias@nordicbet.com>
Cc: kjelle@bingon.no
Cc: pgsql-performance@postgresql.org
Subject: Re: Too slow querying a table of 15 million records
Date: Tue, 28 Jun 2005 01:35:07 -0500
Message-ID: <42C0EF9B.3070308@arbash-meinel.com> (raw)
In-Reply-To: <20050628060333.GH7652@tobias.exoweb.net>
References: <19310.193.213.27.25.1119378838.squirrel@webmail.s7.itpays.net>
<20050628060333.GH7652@tobias.exoweb.net>
Tobias Brox wrote:
>[kjelle@bingon.no - Tue at 08:33:58PM +0200]
>
>
>>I use FreeBSD 4.11 with PostGreSQL 7.3.8.
>>
>>
>(...)
>
>
>>database=> explain select date_trunc('hour', time),count(*) as total from
>>test where p1=53 and time > now() - interval '24 hours' group by
>>date_trunc order by date_trunc ;
>>
>>
>
>I haven't looked through all your email yet, but this phenomena have been up
>at the list a couple of times. Try replacing "now() - interval '24 hours'"
>with a fixed time stamp, and see if it helps.
>
>pg7 will plan the query without knowledge of what "now() - interval '24
>hours'" will compute to. This should be fixed in pg8.
>
>
>
The grandparent was a mailing list double send. Notice the date is 1
week ago. It has already been answered (though your answer is still
correct).
John
=:->
Attachments:
signature.asc (application/pgp-signature, 252B) download
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: john@arbash-meinel.com, tobias@nordicbet.com, kjelle@bingon.no
Subject: Re: Too slow querying a table of 15 million records
In-Reply-To: <42C0EF9B.3070308@arbash-meinel.com>
* 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