Page 1 of 1

UniCommand.GetRecordCount

Posted: Mon 15 Mar 2010 08:35
by jpdomenge
Hi all,

I was wodering how the method GetRecordCount is implemented to know the cost of using it (does it query the database and cache retrieved data ?).

In a same kind of question, what is the best way to retrieve data from an oracle database, for the moment i'm using UniDatareader and I fill dataset but I'm not sure it is the most efficient way. And if I use the method getRecordcount before filling a dataset, is the command executed twice ?

Regards.

Posted: Tue 16 Mar 2010 10:20
by StanislavK
The GetRecordCount method executes a command like "select count(*) from (%your select command%)". Thus, an additional command is executed on the server, but the result set is not cached in the memory of your application.

As for the second question, the UniDataReader class should be the fastest tool for retrieving data from the server.