plsql - count records from a table all the time whenever a select query is performed -


Whenever a specific query is made in the schema, then I should count all the records in a table.

Every time I select (count) the selection count (*) I want a utility, process, funk etc. that count the records in the table Note: I use the SQL devloper tool .

The query looks particularly odd, it can actually cripple your database (optimization mode and Depending on the level of access to the database, this would be "kill").

The only way I see is to use the right graded audit (DBMS_FGA).

  select_sql: = sys_context ('userenv', 'current_sql') should be easier than example to add something; Choose instr (select_sql, 'select / * counter * / count (*)') = 0 then nb_rows: = execute immediately ('select_sql ||') '/ select / * counter (*); end if;  

And store results in a dedicated table or send elsewhere.

Of course you will generate a trigger per table.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -