Re: Question about performance with DB_DataObject and MySQL
| From: | Justin Patrin | Date: | Wed, 07 Jun 2006 20:34:00 +0000 |
| Subject: | Re: Question about performance with DB_DataObject and MySQL | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24279@lists.php.net to get a copy of this message | ||
On 6/7/06, Jose Manuel Zea <jmzeag@yahoo.es> wrote:
Hi all: I want to get a filter for a list consisting in a form with a hierselect of 4 selects chained. I´m going to use Quickform, but the only thing is that the values to pass to the Quickform, I´m getting them from a MySQL table, but because I have 4 tables for the hierselect that means a lot of queries to the DataObject elements. If I have many users connected, is it going to be very heavy to get all these values from the database?. Can anyone tell me an optional way?Well...you could query once, once for each table, and build the hierselect arrays in PHP. Or you could possibly do it with a join and then build it. Or you could run one query perhierselect option. It all depends on the amount of data and such. I suggest profiling different options and seeing which works best. -- Justin Patrin