X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AC4D05665D for ; Thu, 17 Mar 2005 14:00:02 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 41196-05 for ; Thu, 17 Mar 2005 13:59:53 +0000 (GMT) Received: from mx1.aftenposten.no (mx1.aftenposten.no [80.91.34.51]) by svr1.postgresql.org (Postfix) with ESMTP id 56DBA565DB for ; Thu, 17 Mar 2005 13:59:51 +0000 (GMT) Received: from localhost (amavis-mx1.aftenposten.no [80.91.34.52]) by mx1.aftenposten.no (Postfix) with ESMTP id 65BFE8CAC75 for ; Thu, 17 Mar 2005 14:59:55 +0100 (CET) Received: from smtp1.aftenposten.no (unknown [80.91.34.6]) by mx1.aftenposten.no (Postfix) with ESMTP id E30BA8CAAD1 for ; Thu, 17 Mar 2005 14:59:54 +0100 (CET) Received: from telecommail.inpoc.no (unverified) by smtp1.aftenposten.no (Content Technologies SMTPRS 4.3.14) with ESMTP id for ; Thu, 17 Mar 2005 15:01:25 +0100 Received: by TELECOMMAIL with Internet Mail Service (5.5.2653.19) id ; Thu, 17 Mar 2005 15:01:44 +0100 Message-ID: From: "Lending, Rune" To: "'pgsql-performance@postgresql.org'" Subject: queries on huge tables Date: Thu, 17 Mar 2005 15:01:43 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C52AF9.D9B26E60" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200503/357 X-Sequence-Number: 11062 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C52AF9.D9B26E60 Content-Type: text/plain Hello all. I am having a couple of tables with couple of hundre millions records in them. The tables contains a timestamp column. I am almost always interested in getting datas from a specific day or month. Each day contains aprox. 400.000 entries. When I do such queries as " select ... from archive where m_date between '2005-01-01' and '2005-02-01' group by ... " and so on. It takes very long. I am having indexes that kicks in, but still it takes sometime. I have splitted the archive table in smaller monthly tables, it then goes a lot faster, but not fast enough. I know simular systems that uses Oracle and gains a lot on performance because of the partioning. That kind of anoyes me a bit :) Does anyone of you have some good ideas on how speed up such queries on huge tables? regards rune ------_=_NextPart_001_01C52AF9.D9B26E60 Content-Type: text/html Melding
Hello all.
 
I am having a couple of tables with couple of hundre millions records in them. The tables contains a timestamp column.
I am almost always interested in getting datas from a specific day or month. Each day contains aprox. 400.000 entries.
 
When I do such queries as " select ... from archive where m_date between '2005-01-01' and '2005-02-01' group by ... " and so on.
It takes very long. I am having indexes that kicks in, but still it takes sometime.
 
I have splitted the archive table in smaller monthly tables, it then goes a lot faster, but not fast enough.
 
I know simular systems that uses Oracle and gains a lot on performance because of the partioning. That kind of anoyes me a bit :)
 
Does anyone of you have some good ideas on how speed up  such queries on huge tables?
 
regards
rune
 
 
 
 
------_=_NextPart_001_01C52AF9.D9B26E60--