Performance Problem

Started by Pedro C. Ariasalmost 23 years ago3 messagesgeneral
Jump to latest
#1Pedro C. Arias
parias@unr.edu.ar

Hello, i use PostgresSQL 7.3.2 on Mandrake 9.0, I create a Database to test performance vs. SQL-Server, the idea is migrate SQL-Server to Postgres.
This test is retrieve a table sorted by a field ie: "select * from test order by id_field asc", postgress retrieve it in 43 seconds and SQL-Server in 8 seconds
The table has 100.000 records, why the diference, how acelerete the performance of postgres, have any tutorial on the web to optimize querys ?

Pedro
Rosario-Argentina

#2Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Pedro C. Arias (#1)
Re: Performance Problem

On Tue, 15 Apr 2003, Pedro C. Arias wrote:

Hello, i use PostgresSQL 7.3.2 on Mandrake 9.0, I create a Database to
test performance vs. SQL-Server, the idea is migrate SQL-Server to
Postgres. This test is retrieve a table sorted by a field ie: "select
* from test order by id_field asc", postgress retrieve it in 43
seconds and SQL-Server in 8 seconds The table has 100.000 records, why
the diference, how acelerete the performance of postgres, have any
tutorial on the web to optimize querys ?

What is the definition of test and what indexes does it have and what does
explain show for the query above? If you haven't at least vacuumed or
analyzed the table it's likely running on the default statistics which is
probably not good, also you may want/need to look at raising sort_mem if
the sort is going out to disk.

#3Shridhar Daithankar
shridhar_daithankar@persistent.co.in
In reply to: Pedro C. Arias (#1)
Re: Performance Problem

On Wednesday 16 April 2003 07:10, Pedro C. Arias wrote:

Hello, i use PostgresSQL 7.3.2 on Mandrake 9.0, I create a Database to test
performance vs. SQL-Server, the idea is migrate SQL-Server to Postgres.
This test is retrieve a table sorted by a field ie: "select * from test
order by id_field asc", postgress retrieve it in 43 seconds and SQL-Server
in 8 seconds The table has 100.000 records, why the diference, how
acelerete the performance of postgres, have any tutorial on the web to
optimize querys ?

There are too many variables to tune for. To start with, tune postgresql.conf.
Look for number of shared buffers and sort mem. Also vacuum periodically.

More specific information would help.

Shridhar