By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,811 Members | 1,978 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,811 IT Pros & Developers. It's quick & easy.

PostgreSQL is much faster than MySQL, only when...

P: n/a
Hello,
I have changed DB from MySQL to PostgreSQL. When I have run my
application on PostgreSQL it was disaster - it was much slower than
MySQL...

I have tried to change PG configuration file etc.. no luck. After many
long days of thinking what is wrong I have made several tests with
"EXPLAIN" statement, and to my amusement there was many SeqScan - MySQL
didn't show that things. I have made some changes in PG db structure
(new indexes etc) and then I have made another test: PostgreSQL time -
10ms, MySQL time - 1 sec. I've tried to change the structure in MySQL
but it didn't change the results.

So my advise for all users which think that MySQL is faster than PG -
re-check your DB structure, check all your querys using EXPLAIN... maybe
new indexes should be added etc.
Regards,
Marek


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
And ofcourse, you ran ANALYZE before doing any timings, right?

On Tue, Nov 25, 2003 at 01:08:55PM +0100, Marek Lewczuk wrote:
Hello,
I have changed DB from MySQL to PostgreSQL. When I have run my
application on PostgreSQL it was disaster - it was much slower than
MySQL...

I have tried to change PG configuration file etc.. no luck. After many
long days of thinking what is wrong I have made several tests with
"EXPLAIN" statement, and to my amusement there was many SeqScan - MySQL
didn't show that things. I have made some changes in PG db structure
(new indexes etc) and then I have made another test: PostgreSQL time -
10ms, MySQL time - 1 sec. I've tried to change the structure in MySQL
but it didn't change the results.

So my advise for all users which think that MySQL is faster than PG -
re-check your DB structure, check all your querys using EXPLAIN... maybe
new indexes should be added etc.


Regards,
Marek




---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly
--
Martijn van Oosterhout <kl*****@svana.org> http://svana.org/kleptog/ "All that is needed for the forces of evil to triumph is for enough good
men to do nothing." - Edmond Burke
"The penalty good people pay for not being interested in politics is to be
governed by people worse than themselves." - Plato


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/w0f3Y5Twig3Ge+YRAkv4AJ9De8cI7AtaENdLLbZDykYTM+b96w CfQ/IG
LEP1yjkPN9e28v6XllS+iBA=
=3smd
-----END PGP SIGNATURE-----

Nov 12 '05 #2

P: n/a
Użytkownik Martijn van Oosterhout napisał:
And ofcourse, you ran ANALYZE before doing any timings, right?


Of course.


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #3

P: n/a
Cross-posted to "comp.databases.postgresql.advocacy" because
PostgreSQL could be very helpful to MySQL DBAs who wish to optimize their
databases -- just convert it to PostgreSQL on a test system and use EXPLAIN
and ANALYZE to identify the weaknesses.

Even if these MySQL DBAs don't use PostgreSQL for anything else, at
the very least it will increase awareness of the product. =)
Hello,
I have changed DB from MySQL to PostgreSQL. When I have run my
application on PostgreSQL it was disaster - it was much slower than
MySQL...

I have tried to change PG configuration file etc.. no luck. After many
long days of thinking what is wrong I have made several tests with
"EXPLAIN" statement, and to my amusement there was many SeqScan - MySQL
didn't show that things. I have made some changes in PG db structure
(new indexes etc) and then I have made another test: PostgreSQL time -
10ms, MySQL time - 1 sec. I've tried to change the structure in MySQL
but it didn't change the results.

So my advise for all users which think that MySQL is faster than PG -
re-check your DB structure, check all your querys using EXPLAIN... maybe
new indexes should be added etc.


--
Randolf Richardson - rr@8x.ca
Vancouver, British Columbia, Canada

Please do not eMail me directly when responding
to my postings in the newsgroups.
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.