All queries very fast, except one

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

pschmehl
Forum Newbie
Posts: 14
Joined: Fri Oct 19, 2012 8:57 pm

Re: All queries very fast, except one

Post by pschmehl »

Thanks. That is most helpful.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: All queries very fast, except one

Post by Weirdan »

You may want to enable output buffering in php.ini if it's not enabled already. Without buffering, php has to wait for client to acknowledge data it receives as PHP generates the output. Basically, every echo "something" sends "something" to the browser and waits for confirmation.

Be warned that it may cause memory usage to jump up, in which case you will probably want not to just set it to 'On' but tweak the value using specific buffer size. Something like 128KB, or even 1MB should probably suffice.
Post Reply