Re: Performance w/ multiple WHERE clauses - Mailing list pgsql-sql

From Aaron Held
Subject Re: Performance w/ multiple WHERE clauses
Date
Msg-id 3D8B2C02.8020904@MetroNY.com
Whole thread Raw
In response to Creating a field that uses totals other fields?  (Sloan Bowman <smileyq@nashlinux.com>)
Responses Re: Performance w/ multiple WHERE clauses  (Josh Berkus <josh@agliodbs.com>)
List pgsql-sql
Thanks,
Changing '0/19/01' to '0/19/01'::date gave me a subjective 50% speedup.A ran a bunch of queries w/ explain and I
noticedthat some 
 
combinations did not use the indexes and went right to seq scan.  All of 
the where clause args are indexed.
# SET enable_seqscan to FALSE ;forced the use of an Index and sped things up greatly.

I am not sure why it made the switch.  The load on the server seems to 
affect the performance, but I am seeing it more on the production server 
with 100 million rows as opposed to the development server with only 
about 6 million.  I need to buy more drives and develop on a larger data 
set.

Thanks for the help,
-Aaron Held

Chris Ruprecht wrote:
> Aaron,
> 
> On Wed September 18 2002 17:17, Aaron Held wrote:
> 
>>I am running into a serious performance issue with some basic queries.
>>
>>If I run something like
>>
>>   select * from "Calls" WHERE
>>                ( ("CallType" = 'LONG DIST' ))
>>
>>The search takes about 15 seconds
>>
>>if I run
>>    select * from "Calls" WHERE
>>        ( ( "DateOfCall"='06/19/02') )
>>        AND ( ( "CallType" = 'LONG DIST' ))
>>   [DateOfCall is a DateTime field]
> 
> 
> try ... "DateOfCall" = '2002-06-19'::date ...
> 
> Best regards,
> Chris




pgsql-sql by date:

Previous
From: "alexandre :: aldeia digital"
Date:
Subject: Re: Query Freeze
Next
From: Stephan Szabo
Date:
Subject: Re: [GENERAL] timestamp parse error