|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-02-15 10:11 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 12:00:01 2025 UTC |
Description: ------------ from the source code, the using time in this query about 7-10 ms (for exec pg_query) but when i using EXPLAIN ANALYZE in query, postgresql say it using 0.9 ms in query, so i think it very lost time in pg_query 5-8 ms. Because my web page have 4-10 query per page this consume time it make my server cannot service more than 20 page/sec (1/(5 query X 10 ms), if reduce this time it very speed up my php page this problem not appear if query from one table , but when join table more than one table in query it happen. in jsp&jdbc does not have any this problem Reproduce code: --------------- function microtime_float() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec);} $q = "select a.id, b.id, c.id, d.id, e.id from a,b,c,d,e where a.id=b.aid and b.id=c.bid and c.id=d.cid and d.id=e.did"; $time_start = microtime_float(); pg_query ($q); $time_end = microtime_float(); $time = $time_end - $time_start;