Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
kumarkoppireddy4-Oct-18 4:54
kumarkoppireddy4-Oct-18 4:54 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
Dave Kreskowiak4-Oct-18 5:04
mveDave Kreskowiak4-Oct-18 5:04 
AnswerRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
Gerry Schmitz4-Oct-18 5:10
mveGerry Schmitz4-Oct-18 5:10 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
kumarkoppireddy4-Oct-18 5:52
kumarkoppireddy4-Oct-18 5:52 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
Dave Kreskowiak4-Oct-18 6:22
mveDave Kreskowiak4-Oct-18 6:22 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
kumarkoppireddy4-Oct-18 6:25
kumarkoppireddy4-Oct-18 6:25 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
Dave Kreskowiak4-Oct-18 6:46
mveDave Kreskowiak4-Oct-18 6:46 
GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
OriginalGriff4-Oct-18 6:32
mveOriginalGriff4-Oct-18 6:32 
Dave is absolutely right - by trying to cache data outside of the DB that you are sourcing from, you need to catch everything that happens to your DB and invalid specific portions of your cache if the change might have affected the results of a query. Otherwise, your cached data becomes increasingly out of date and useless.
For example, I issue a stock level request for Product A, and you return "2".
Next time I ask, it's in your cache, so you return "2" without going to the DB.
Then Joe over there sells one, and the DB gets updated to "1"
I ask again, it's in your cache, so you return "2" without going to the DB.
Joe sells anoth, and the DB gets updated to "0"
I ask again, it's in your cache, so you return "2" without going to the DB.
So the customer I'm talking to "knows" there are 2 in stock - and buys one. What happens now?

Unless you "stand in the middle" and pass each query through or serve them from your cache while intelligently invalidating the caches as appropriate, your data gets more and more irrelevant.
And that is going to slow down the whole process as well, because now you have effectively two sources of data processing every single command!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralRe: How to Cache a DB2 Dynamic Query in ADO.net Pin
Mycroft Holmes4-Oct-18 12:48
professionalMycroft Holmes4-Oct-18 12:48 
Questiondisplay value of a key in dictionary to text box and edit value and save out to file Pin
elfenliedtopfan53-Oct-18 14:02
elfenliedtopfan53-Oct-18 14:02 
AnswerRe: display value of a key in dictionary to text box and edit value and save out to file Pin
Maciej Los3-Oct-18 20:28
mveMaciej Los3-Oct-18 20:28 
AnswerRe: display value of a key in dictionary to text box and edit value and save out to file Pin
OriginalGriff3-Oct-18 20:35
mveOriginalGriff3-Oct-18 20:35 
AnswerRe: display value of a key in dictionary to text box and edit value and save out to file Pin
dan!sh 3-Oct-18 20:36
professional dan!sh 3-Oct-18 20:36 
AnswerRe: display value of a key in dictionary to text box and edit value and save out to file Pin
BillWoodruff14-Oct-18 15:21
professionalBillWoodruff14-Oct-18 15:21 
QuestionOPC client server Pin
Roberto64_Ge3-Oct-18 2:28
Roberto64_Ge3-Oct-18 2:28 
AnswerRe: OPC client server Pin
Richard MacCutchan3-Oct-18 3:11
mveRichard MacCutchan3-Oct-18 3:11 
GeneralRe: OPC client server Pin
Roberto64_Ge3-Oct-18 4:10
Roberto64_Ge3-Oct-18 4:10 
GeneralRe: OPC client server Pin
Richard MacCutchan3-Oct-18 4:52
mveRichard MacCutchan3-Oct-18 4:52 
GeneralRe: OPC client server Pin
Roberto64_Ge3-Oct-18 9:51
Roberto64_Ge3-Oct-18 9:51 
GeneralRe: OPC client server Pin
Richard MacCutchan3-Oct-18 22:02
mveRichard MacCutchan3-Oct-18 22:02 
GeneralRe: OPC client server Pin
Dave Kreskowiak3-Oct-18 5:00
mveDave Kreskowiak3-Oct-18 5:00 
GeneralRe: OPC client server Pin
Roberto64_Ge3-Oct-18 10:10
Roberto64_Ge3-Oct-18 10:10 
GeneralRe: OPC client server Pin
Roberto64_Ge4-Oct-18 3:28
Roberto64_Ge4-Oct-18 3:28 
GeneralRe: OPC client server Pin
OriginalGriff4-Oct-18 3:46
mveOriginalGriff4-Oct-18 3:46 
GeneralRe: OPC client server Pin
Dave Kreskowiak4-Oct-18 4:29
mveDave Kreskowiak4-Oct-18 4:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.