Re: Performance w/ multiple WHERE clauses

Поиск
Список
Период
Сортировка
От Aaron Held
Тема Re: Performance w/ multiple WHERE clauses
Дата
Msg-id 3D8B2C02.8020904@MetroNY.com
обсуждение исходный текст
Ответ на Creating a field that uses totals other fields?  (Sloan Bowman <smileyq@nashlinux.com>)
Ответы Re: Performance w/ multiple WHERE clauses
Список 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 по дате отправления:

Предыдущее
От: "alexandre :: aldeia digital"
Дата:
Сообщение: Re: Query Freeze
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: [GENERAL] timestamp parse error