Writing to the database for every read can have a big impact on performance. If you're using MySQL, I'd take a look at the built in query logger, which writes queries to a file.
http://dev.mysql.com/doc/refman/5.1/en/query-log.html -- Hector On Fri, Jan 22, 2010 at 7:29 AM, Guillaume ORIOL <gor...@technema.fr> wrote: > Hi, > > I would like to implement a query tracker in Zend_Db for some tables. > The idea is to store in db an history of all SQL queries that were executed > on these tables. > > Here is the kind of table schema I would like to populate with it: > CREATE TABLE table_history ( > id TIMESTAMP NOT NULL PRIMARY KEY, > tablename CHAR(64), > query VARCHAR(...) > ); > > I was thinking of using db profiling mechanism to do it. What would you > suggest? > -- > > Guillaume ORIOL > >