[TYPO3-dev] Typo3 Database design question (optimization / indices)

Bernhard Kraft kraftb at kraftb.at
Thu Mar 23 19:41:23 CET 2006


Marc Wöhlken wrote:

> Doing some measurements I found that the average db processing time on
> my system was 0.122s. this seems quite fast but wait until we see what
> index fileds can do for us ;-)
> 
> 2. I modified a few of the Typo3-Database tables to make use of refinded
> indices. For details see SQl-statements below
> 
> Than I remeasured the db processing time and found it to be remarkably
> faster: 0.0004s on average!

And if you already bring that up you should know that when you perform a query
the following happens:

You do a mysql_query();
php has to wait for mysql
mysql has to wait for the disks/memory etc.
the result is ready.
mysql_query returns ... the php code continues to run
and fetches the result ...

now it is possible to do an "unbuffered" query:

http://www.php.net/manual/en/function.mysql-unbuffered-query.php

which returns as soon as the query is sent to the server and found to be valid...

you can continue to do some things in php until you decide to fetch the results which
could probably be ready then ....


using this method insted of normal sql_query() could speed up reaction time in some
places ... altough it can't get replaced everywhere ..


greets,
Bernhard
-- 
----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
----------------------------------------------------------------------




More information about the TYPO3-dev mailing list