Re: Query performance issue - Mailing list pgsql-general

From Greg Sabino Mullane
Subject Re: Query performance issue
Date
Msg-id CAKAnmmL_=6PjxSJD105oSSfEPiCyk_KQp5ZCPz2AsdunznOXeA@mail.gmail.com
Whole thread Raw
In response to Re: Query performance issue  (yudhi s <learnerdatabase99@gmail.com>)
List pgsql-general
Additionally in the plan which mysql makes and showing the highest response time, is it suffering because of differences of the speed of the underlying IO/storage or is it just because of the optimization features which are available in postgres and not there in mysql ? Trying to understand if it can be identified from the execution plan itself.

I think trying to compare postgres and mysql plans against each other is not a very useful endeavor. There are fundamental design decisions between the two. Focus on making your Postgres query the best it can be, full stop. Optimize your queries, make sure the database is analyzed, and tweak some configs as needed.

Also, you cannot accidentally forget a join condition.

Yes, this is the primary reason. Cartesian joins hurt.

Again , not able to clearly understand the third point you said below. Can you please clarify a bit more. Do you mean we should write it as exists /not exists rather IN and NOT IN and that will improve the performance?

It gives Postgres more options on how to do things, so yes, it can be better.

Cheers,
Greg
 

pgsql-general by date:

Previous
From: Muhammad Ikram
Date:
Subject: Re: CURRENTE_DATE
Next
From: Igor Korot
Date:
Subject: Re: Assistance Required: Timeout or Buffer Overflow Issue in PostgreSQL Client Application