A
A
Alexey Sumin2012-06-13 12:35:58
Oracle
Alexey Sumin, 2012-06-13 12:35:58

How to write data from Oracle trigger to memcache?

Task: after updating an entry in the Oracle table, this entry must be copied to memcache. How can (and is it possible at all) to connect to the memcache server from Oracle?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
G
gelas, 2012-06-13
@gelas

On the one hand, as I remember, there is a package for working with TCP , and memcached has a text protocol.
On the other hand, there is Java Stored Procedures
But on the third side, memcached is apparently used for caching, so why not cache specific data that applications need, and not the results of queries from the database, and use them from different applications, it would probably be easier to maintain .

R
rPman, 2012-06-13
@rPman

start working with this button ;)
www.datadisk.co.uk/html_docs/oracle/external_procedures.htm
ps I strongly recommend that you think over the architecture of your application again ... something sad you get, but how sad will those who will support your application in the future.

E
egorinsk, 2012-06-13
@egorinsk

Isn't it more logical to do this in the application code?
Although, I feel that you already have a boring code there.

B
bugman, 2012-07-10
@bugman

+1 to “try the optimization tools that Oracle has”:
- in the application, do not create / debuild a connection every time, but keep it constant, pre-pass queries, bind variables
- run AWR in the trendy Oracle Enterprise Manager web console, see what it finds
- raise SGA , increase the cache buffer
— make sure that the elementary rules for separating datafiles, redulogs, archivelogs across disks are observed and there is no downgrade from the disk subsystem, system and oracle jobs
— collect statistics, look at fragmentation (chained rows), monitor the requests themselves, see plans -> perhaps something else can be overclocked
- to materialize heavy requests, to make clusters from the most frequently joined plates
It seems to me that if you have some additional free resource (ram, cpu) that you are going to give to a third-party caching solution, maybe first try to add the same resource to the database server + some tuning?
I'm just afraid that any do-it-yourself cache invalidation scheme living on triggers on every row will create more delays -> data inconsistency when reading from the cache

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question