Hi
I have a table with 100,000+ records in it and every 2nd day I have to read all the records in that table to do some reports. If I use TZTable to read this table will it fetch all the records at once in memory or will it read as it goes along?
Is it possible to have Unidirectional mode like in dbExpress?
Regards
Sandeep
Accessing large tables
Moderators: gto, cipto_kh, EgonHugeist
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Hi Sandeep,
As far as I know, when you arrive at the end of your dataset, everything will be in memory. Whether it will be read at once or not depends partially on your database implementation. For mysql you can choose, I think.
For the Unidirectional mode : that's a TDataset property, so it should be available. I only don't know if it affects the behaviour the way you expect.
I think you know : avoid processing all data from a table when you can ask your database to do it.
If you just need summaries you can usually write these in a query.
Sometimes you can create a temporary table to summarize data a little before you actually get them into your app.
If you have to write all this data to a file, there might be better solutions to do that.
Mark
As far as I know, when you arrive at the end of your dataset, everything will be in memory. Whether it will be read at once or not depends partially on your database implementation. For mysql you can choose, I think.
For the Unidirectional mode : that's a TDataset property, so it should be available. I only don't know if it affects the behaviour the way you expect.
I think you know : avoid processing all data from a table when you can ask your database to do it.
If you just need summaries you can usually write these in a query.
Sometimes you can create a temporary table to summarize data a little before you actually get them into your app.
If you have to write all this data to a file, there might be better solutions to do that.
Mark
-
- Expert Boarder
- Posts: 158
- Joined: 06.11.2005, 01:43
Not quick 'n dirtysandeep_c24 wrote:Thanks, I'll try that.
Can Unidirectional mode be added to Zeos?
Regards
Sandeep
Some changes must be made, like a property to set the Unidirectional condition and all the paths to avoid if it's set (like no caching). In other words: It's possible, but must be made