A customer of mine has the following procedure:
Once someone needs to send a mail from the application system, writes a record in an Oracle table, with the message and a "NEW RECORD" flag in a field of the row.
Periodically a script scans this table and when it finds a a row with this "NEW RECORD" flag, sends the e-mail and update the field with a "ELABORATED RECORD" flag.
This means a periodical full table scan on an always growing table.
I would like to write a trigger which sends the e-mail each time a new row is appended in the table, is it possible?
Once someone needs to send a mail from the application system, writes a record in an Oracle table, with the message and a "NEW RECORD" flag in a field of the row.
Periodically a script scans this table and when it finds a a row with this "NEW RECORD" flag, sends the e-mail and update the field with a "ELABORATED RECORD" flag.
This means a periodical full table scan on an always growing table.
I would like to write a trigger which sends the e-mail each time a new row is appended in the table, is it possible?