Re: Very slow queries on 8.1

From: David Rysdam <drysdam(at)ll(dot)mit(dot)edu>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Very slow queries on 8.1
Date: 2005-11-17 16:28:42
Message-ID: 437CAFBA.4090702@ll.mit.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

int4, not null and the index is unique. I even tried clustering on it
to no avail.

codeWarrior wrote:

>What is the data type for "signum" ???
>
>
>
>"David Rysdam" <drysdam(at)ll(dot)mit(dot)edu> wrote in message
>news:437CA40A(dot)8020507(at)ll(dot)mit(dot)edu(dot)(dot)(dot)
>
>
>>I'm porting an application from Sybase and I've noticed that similar
>>application functions take 2 to 3 times longer on postgres than they used
>>to on the same machine running under Sybase. I've tried changing various
>>"performance tuning" parameters, such as shared_buffers,
>>effective_cache_size, etc but there's little or no effect. I'm beginning
>>to think there's a deeper root cause to the slowness.
>>
>>Right now, I'm working on a test case that involves a table with ~360k
>>rows called "nb.sigs". My sample query is:
>>
>>select * from nb.sigs where signum > 250000
>>
>>With no index, explain says this query costs 11341. After CREATE INDEX on
>>the signum field, along with an ANALYZE for nb.sigs, the query costs 3456
>>and takes around 4 seconds to return the first row. This seems extremely
>>slow to me, but I can't figure out what I might be doing wrong. Any
>>ideas?
>>
>>(If necessary, I can write an entire script that creates and populates a
>>table and then give my performance on that sample for someone else to
>>check against.)
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 6: explain analyze is your friend
>>
>>
>>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Berend Tober 2005-11-17 16:29:08 Re: Most significant digit number formatting
Previous Message Tom Lane 2005-11-17 16:28:35 Re: Very slow queries on 8.1