I know the potential impact on performance, Hector.
But I need only to store INSERT, UPDATE and DELETE queries, not SELECT
and as I stated, it is only for SOME tables.

The solution you suggest is not ne right one for me as the result could not be managed in my application back-office.
And this is what I am looking for.

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.


--
Hector


On Fri, Jan 22, 2010 at 7:29 AM, Guillaume ORIOL <[email protected]> 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




--

Guillaume ORIOL
[email protected]
Technema
TECHNEMA
TÈl : 01 60 94 70 30
Fax : 01 60 03 12 40
Mob : 06 81 43 04 06

Reply via email to