Search Postgresql Archives

Apache + PHP + Postgres Interaction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

I have a subject setup and a few questions.

The first one is this. PHP establishes a connection to the Postgres database through pg_pconnect(). Then it runs some query, then the script returns, leaving the persistent connection hanging. But the trouble is that in this case any query takes significantly more time to execute than in the case of one PHP script running the same query with different parameters for N times. How can I achieve the same performance in the first case? Persistent connections help but not enough - the queries are still 10 times slower than they would be on
the 2nd time.


The second one is that the machine with this setup is dual core Xeon 2.8ghz. I've read somewhere about the switching context problem and bad postgres performance. What are the effects? What are the symptoms? And what will be the performance gain if I change the machine to equal Athlon?

Thank you in advance.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux