Re: oop too slow
| From: | Angelo Zanetti | Date: | Thu, 19 Aug 2004 09:42:04 +0000 |
| Subject: | Re: oop too slow | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-194233@lists.php.net to get a copy of this message | ||
maybe you can rewrite your SQL statements in a way that will improve
retrieval time. Google for it.
things like select * from ... when you are not using all fields is bad
practise. there are many others.
Angelo
>>> Thomas Seifert <thomas-lists@mysnip.de> 8/19/2004 11:33:05 AM >>>
On Thu, 19 Aug 2004 11:21:16 +0200, Krzysztof Gorzelak wrote:
> Each object gets data from mysql by itself. The generation time
of 1
> category [30 products, 10 keys, 5 values ~= 300 mysql queries] takes
as I
> said more than a 1s (on quite fast machine). How can this model be
improved?
Why are you doing 300(!!!) mysql queries?
I guess you can retrieve the same data with much less queries.
300 queries are slow ... not OOP.
thomas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--------------------------------------------------------------------
Disclaimer
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is
intended for the attention and use only of the addressee.
Should you have received this e-mail in error, please delete
and destroy it and any attachments thereto immediately.
Under no circumstances will the Cape Technikon or the sender
of this e-mail be liable to any party for any direct, indirect,
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911