Re: Need more speed from this.

From: wsheldah(at)lexmark(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Need more speed from this.
Date: 2001-11-19 22:13:46
Message-ID: 200111192214.RAA13786@interlock2.lexmark.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Forwarding to the list......
---------------------- Forwarded by Wesley Sheldahl/Lex/Lexmark on 11/19/2001
05:16 PM ---------------------------

Brian Avis <brian(dot)avis%searhc(dot)org(at)interlock(dot)lexmark(dot)com> on 11/19/2001 05:02:39
PM

To: "Wesley_Sheldahl/Lex/Lexmark.LEXMARK"@sweeper.lex.lexmark.com
cc: (bcc: Wesley Sheldahl/Lex/Lexmark)
Subject: Re: [GENERAL] Need more speed from this.

Okay then. :)

EXPLAIN SELECT AVG(data) FROM system_data
WHERE date BETWEEN CAST('2000-01-01' AS DATE)
AND CAST ('2000-01-31' AS DATE)
AND
server_id = 26
AND
data_type_id = 8;

Gives me this.

NOTICE: QUERY PLAN:

Aggregate (cost=17296.84..17296.84 rows=1 width=8)
-> Index Scan using data_type_id_idx on system_data
(cost=0.00..17296.84 rows=1 width=8)

EXPLAIN

The table grows once a day via a perl script.

I will add an index to the date column and see what happens.

wsheldah(at)lexmark(dot)com wrote:

>
>Standard questions:
>Have you run VACUUM ANALYZE recently?
>
>Could you send the results of running EXPLAIN on the query in question?
>
>Do the statistics from the EXPLAIN look reasonably accurate?
>
>How about adding an index to the date column?
>
>Is the table growing interactively, or via a once-a-day batch?
>
>HTH,
>
>Wes Sheldahl
>
>
>
>
>
>
>

--
Brian Avis
SEARHC Medical Clinic
Juneau, AK 99801
(907) 463-4049
cd /pub
more beer

Responses

Browse pgsql-general by date

  From Date Subject
Next Message wsheldah 2001-11-19 22:17:14 Re: Need more speed from this.
Previous Message Bruce Momjian 2001-11-19 21:50:05 Re: explanation about buffers and memory usage ... ?