Re: pgsql performance

From: Date: Tue, 06 Feb 2001 11:33:21 +0000
Subject: Re: pgsql performance
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-6416@lists.php.net to get a copy of this message
Greetings, Cameron! At 06.02.2001, 14:23, you wrote: C> whilst i know that mysql is generally faster than pgsql i just tried to C> convert another of my mysql projects to pgsql, in mysql the list takes C> about 1 second (SELECT * FROM email LIMIT 0,300 on 180000 records), the C> same query in pgsql is taking around 5 seconds, i know i have tweaked C> mysql a little and played with things to make it faster, i was wondering C> if there are any tips to pgsql? i didnt think pgsql was that slow :( if "SELECT * FROM email LIMIT 0,300" is your actual query, I would strongly advise to use an ORDER BY some_indexed_field. This will make Postgres' optimizer use an index scan. Not to mention the fact that LIMIT without an ORDER will return you some random rows from a table... besides, if you are running Postgres with default options, you should increase the amount of memory it allocates for buffers and sorting. By default Postgres is VERY conservative about memory usage. -- Yours, Alexey V. Borzov, Webmaster of RDW

« previous php.db (#6416) next »