Re: Open source project
| From: | Ashley Sheridan | Date: | Tue, 02 Dec 2014 12:50:35 +0000 |
| Subject: | Re: Open source project | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-324074@lists.php.net to get a copy of this message | ||
On 2 December 2014 12:37:15 GMT+00:00, Farzan Dalaee <farzan.dalaee@gmail.com> wrote:
>Dear Ash
>How can i log db calls?
>
>On Tue, Dec 2, 2014, 3:22 PM Ashley Sheridan <ash@ashleysheridan.co.uk>
>wrote:
>
>>
>>
>> On 2 December 2014 10:57:42 GMT+00:00, Farzan Dalaee <
>> farzan.dalaee@gmail.com> 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 r
>> ’6©#
+Pö§a¿«58http://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