Shawn,

Use Transactions.

I have done some programs that behave like the one you indicate: every once
in a while, there is a surge of DB activity (inserts).

By wrapping the block of inserts inside of a transaction, I have seen speed
increases of over 1000 to 1 (yes - one thousand to one), depending on the
database backend.

Then, you don't need to worry about "caching", generally.

Hope that helps,

Tom

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Shawn Jones
Sent: Thursday, August 03, 2006 13:53
To: delphi-db@elists.org
Subject: Database Design Suggestions

I'm developing an app that will collect and display real-time market data. 
This data often times arrives is surges at which time maintaining minimum 
cpu utilization is important therefore I'm concerned about Insert 
performance.

I'm thinking some type of caching scheme would be appropriate where the 
quotes accumulate in the cache and would be periodically updated.

I need to display the real-time quotes and display real-time charts with 
history, therefore I need to be able to read the cached data and the 
persisted data on chart refreshes.

I'm guessing this is not that unique of a requirement and therefore don't 
want to reinvent the wheel.  This will be a single user app with no near 
term plans for any type of client server architecture therefore an embedded 
type solution would be preferred especially if higher performance (lower cpu

utilization) can be achieve with an embedded solution.

I'm somewhat of a rookie with databases and would appreciate any thoughts 
and suggestions on how to structure this or any specific database 
suggestions.

shawn


_______________________________________________
Delphi-DB mailing list
Delphi-DB@elists.org
http://www.elists.org/mailman/listinfo/delphi-db

Reply via email to