Re: 200 times slower then MSSQL??

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Alexander Dolgin <alex(at)dolgin(dot)dp(dot)ua>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: 200 times slower then MSSQL??
Date: 2005-01-25 17:52:28
Message-ID: 41F6875C.9040804@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


> with about 8000 rows. For this table query:
>
> SELECT MAX(MsgSeqNum),MAX(LogTimestamp) FROM ELT_tcli_MessageLog
> WHERE LogTimestamp >= '0' AND IsFromCounterParty = 'Y' AND
> IsOutOfSequence = 'N'
> AND ConnectionName = 'DB_BENCHMARK'
> AND LogTimestamp IN (SELECT MAX(LogTimestamp)
> FROM ELT_tcli_MessageLog
> WHERE MsgSeqNum > 0 AND IsFromCounterParty = 'Y'
>
> AND IsOutOfSequence = 'N' AND
> ConnectionName = 'DB_BENCHMARK')
>
> takes about 1 second on MSSQL Server and 257 seconds on PostgreSQL one.
>
> Does anybody have idea about reasons of such results?

1. Have you run vaccum analyze recently?
2. Reply with the output of EXPLAIN ANALYZE SELECT...

Chris

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2005-01-25 17:56:53 Re: PostgreSQL vs. Oracle vs. Microsoft
Previous Message Josh Berkus 2005-01-25 16:58:37 Re: PgPool changes WAS: PostgreSQL clustering VS MySQL