Re: [PERFORM] 200 times slower then MSSQL??

2005-01-26 Thread PFC
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)

Re: [PERFORM] 200 times slower then MSSQL??

2005-01-25 Thread Kaloyan Iliev Iliev
Hi, First it will be good if you supply some EXPLAIN ANALYZE results from your query. Second, do you created the indexes which can be used with WHERE conditions. And Third AFAK MAX doesn't use index. If you only need max then you can try: ORDER BY DESC and LIMIT 1. But you can't use this i

Re: [PERFORM] 200 times slower then MSSQL??

2005-01-25 Thread Christopher Kings-Lynne
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)

Re: [PERFORM] 200 times slower then MSSQL??

2005-01-25 Thread Tom Lane
"Alexander Dolgin" <[EMAIL PROTECTED]> writes: > Does anybody have idea about reasons of such results? Try converting the MAX() functions to queries that will use indexes. See FAQ entry 4.7 "My queries are slow or don't make use of the indexes. Why?" regards, tom lane ---

[PERFORM] 200 times slower then MSSQL??

2005-01-25 Thread Alexander Dolgin
Hi all, We are developing some application that works with DB over JDBC. We've used MSSQL before and trying to migrate to PostgreSQL now. Unfortunately problems with performance are found. MSSQL with default configuration looks like much faster then PostgreSQL on the same hardware (PostgreSQL8 rc5