Re: libpq or postgresql performance

Поиск
Список
Период
Сортировка
От Ireneusz Pluta
Тема Re: libpq or postgresql performance
Дата
Msg-id 504999A8.1010301@wp.pl
обсуждение исходный текст
Ответ на libpq or postgresql performance  (Aryan Ariel Rodriguez Chalas <wimogan@yahoo.com>)
Список pgsql-performance
W dniu 2012-09-06 22:04, Aryan Ariel Rodriguez Chalas pisze:
> -Why if I connect to the remote server desktop (using RDP or any Remote Desktop Application) and run the application
usingthe same internet connection, it runs really fast when making requests to postgresql; but if I run the application
locallyby connecting to the remote postgresql server through "libpq", it's really slow?. 
It might look like the client side fetches too much data or sends too many queries over the
connection to the database server and then further processes that data locally. Are you using some
kind of ORM in your application?

If that is the case, you might need to refactor your application to do as much as possible
computation at server side and deal only with computation results over the connection, not the raw data.

Try to see in server log what SQL statements are executed while you are running your application.
You need to SET log_statement TO 'all' for that.

With psql, try to see how much data (how many rows) are returned from that query you call "simple
query". Even simple query may return a lot of rows. Server backend might execute it quickly, but
returning a huge result over the Internet might take a long time.


В списке pgsql-performance по дате отправления:

Предыдущее
От: "Albe Laurenz"
Дата:
Сообщение: Re: libpq or postgresql performance
Следующее
От: John Nash
Дата:
Сообщение: Re: exponential performance decrease in ISD transaction