On 2 December 2014 12:37:15 GMT+00:00, Farzan Dalaee <farzan.dalaee@xxxxxxxxx> wrote: >Dear Ash >How can i log db calls? > >On Tue, Dec 2, 2014, 3:22 PM Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx> >wrote: > >> >> >> On 2 December 2014 10:57:42 GMT+00:00, Farzan Dalaee < >> farzan.dalaee@xxxxxxxxx> wrote: >> >Dear Ash >> > >> >Thanks for your tips, about number two inline js for use multi tree >> >view >> >in one page, and i cant understand number three would you explain >it >> >please >> >Thanks again for your consideration >> >Best regards >> >Farzan Dalaee >> >> Hi, just keeping the list copied in as this may benefit others. >> >> There are many ways to store hierarchical data in a db, the adjacency >> method that you're using is simple to use, but slow and complex to >execute >> when there are many parent/child relationships. >> >> There are whole books on this subject, but http://stackoverflow.com/ >> questions/192220/what-is-the-most-efficient-elegant-way-to- >> parse-a-flat-table-into-a-tree/192462#192462 has a good explanation >on >> some other ways of storing hierarchical trees in MySQL and how to >maintain >> them through SQL. >> >> Maybe you could log the number of db calls you're making, as this >might >> show you how much is being done by the db just to show the full tree. >> >> Thanks, >> Ash >> Thanks, >> Ash >> You can do this by adding a line like: log = /path/to/log.log In your MySQL config file (usually /etc/my.conf). Restart mysqld and it should now log all queries there. only use this during development as it slows down MySQL a lot! Thanks, Ash -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php