Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: a MySQL to PostgreSQL successful port, but performance is bad...



Jim Brown <jimbrown32rb(at)yahoo(dot)com> writes:
> Here's my problem, though: queries in mySQL are almost
> instantaneous, whereas those same queries in
> PostgreSQL can take four seconds or more - even when
> I'm hitting a table with only one row. I'll bet I have
> something misconfigured, but I'm a newbie FNG, and I
> don't yet know my way around yet. 

Two things to check right away: have you ANALYZEd all your tables, and
did you remember to make all the same indexes you have in the MySQL
database?  (I believe PG and MySQL have slightly different ideas about
when to make indexes automatically.)  psql's "\d table" command is a
handy way to verify what indexes you have on a table.

If you're still having problems, feel free to post EXPLAIN ANALYZE
output for the problem queries on pgsql-performance.  Also mention
which postgresql.conf settings you're using.

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group