Subject | RE: [IBO] Efficient Record Count |
---|---|
Author | Bill Morrison |
Post date | 2001-12-14T15:13:53Z |
A select count(*) would probably be your best bet. For just this purpose you
could get away with using a TIB_DSQL component, although it can be
accomplished with pretty much any of Jason's querying components.
One warning : InterBase itself takes some time to do the count, especially
for large tables (it physically "touches" each record and performs back
version cleanup as memory serves, there are some threads on mers.com that
discuss this in more detail if you are interested). Thus you may want to
launch a seperate thread to get the record count to prevent your main form
from bogging down waiting for the result.
Bill M
-----Original Message-----
From: dkLists [mailto:dklists@...]
Sent: Thursday, December 13, 2001 6:22 PM
To: IBObjects@yahoogroups.com; ib-support@yahoogroups.com
Subject: [IBO] Efficient Record Count
All -
I have a large table with approximately 1 million rows that will be
continually growing over time. It is useful to be able to review the
recordcount whenever I run my app and add/delete data. I've been trying to
come up with an efficient way to maintain a 'running' record count without
loading the entire dataset to the client, i.e. autofetchall.
Would it be much faster to do this in a stored procedure? If so, would it be
as simple as doing a SELECT COUNT(*) FROM TABLE? If not, is there a
particular IBObjects component that should be used?
All advice welcome.
Thanks in advance.
___________________________________
GreatLand Technology
inquiries@...
___________________________________
[Non-text portions of this message have been removed]
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
could get away with using a TIB_DSQL component, although it can be
accomplished with pretty much any of Jason's querying components.
One warning : InterBase itself takes some time to do the count, especially
for large tables (it physically "touches" each record and performs back
version cleanup as memory serves, there are some threads on mers.com that
discuss this in more detail if you are interested). Thus you may want to
launch a seperate thread to get the record count to prevent your main form
from bogging down waiting for the result.
Bill M
-----Original Message-----
From: dkLists [mailto:dklists@...]
Sent: Thursday, December 13, 2001 6:22 PM
To: IBObjects@yahoogroups.com; ib-support@yahoogroups.com
Subject: [IBO] Efficient Record Count
All -
I have a large table with approximately 1 million rows that will be
continually growing over time. It is useful to be able to review the
recordcount whenever I run my app and add/delete data. I've been trying to
come up with an efficient way to maintain a 'running' record count without
loading the entire dataset to the client, i.e. autofetchall.
Would it be much faster to do this in a stored procedure? If so, would it be
as simple as doing a SELECT COUNT(*) FROM TABLE? If not, is there a
particular IBObjects component that should be used?
All advice welcome.
Thanks in advance.
___________________________________
GreatLand Technology
inquiries@...
___________________________________
[Non-text portions of this message have been removed]
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/