Ok,

So scenario 1

Query the database and get a record set.

Query the record set for additional queries that only need data from the
record set

Query 1 - select all records from DB where site_id matches and timestamps
are less than an hour old

Query 2 - (qNq) select all records from Query 1 where time stamps are less
than 5 minutes old.

 Query 3 - (qNq) select all records from Query 1 where time stamps are less
than 10 minutes old but older than 5 minutes

Query 3 - (qNq)  select all records from Query 1 where time stamps are less
than 10 minutes old but older than 5 minutes
*Adds processing load on OPENBD because it processes query in query, not sql
server
*OpenBD is probably less efficient with Query in Query than DB Server is
with cached queries

Scenario 2

Query the database and get a record set.

 Query 1 - select all records from DB where site_id matches and timestamps
are less than an hour old

Query 2 - select all records from DB where site_id matches and time stamps
are less than 5 minutes old.

Query 3 - select all records from DB where site_id matches and time stamps
are less than 10 minutes old but older than 5 minutes

*Even though Scenario 2 requires a call to the db server for each query,
this may be faster and less load on openbd server since after the first
query, the results will be cached and additional queries calling for more
specific data will use the cached data.

*Continue to query the database for data even though there is an existing
query in memory that contains all the needed data, mostly because the
database has already cached results from the first query, so going to it
again doesn't present a huge load, probably less of a load than actually
doing 12 new queries managed by openbd vs SQL Server.

Sound right?

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 mailing list - http://groups.google.com/group/openbd?hl=en

 !! save a network - please trim replies before posting !!

Reply via email to