Question - traffic network with Select * from table and FetchRows = 25

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
rrcanalista
Posts: 12
Joined: Mon 06 Feb 2012 20:53

Question - traffic network with Select * from table and FetchRows = 25

Post by rrcanalista » Wed 25 Jul 2012 18:09

Hi, I have a question, if I have in one table about 1 milion of records and use the follow sql : Select * from table and fetchRows set to 25,40.

Question : how many records are returned ? 1 milion or the number of fetchrows property?

The next records will show while we get more records after end of table , this operation get the records from the memomory or get next records from database?

I'd like to know what the network traffic in this situation.

Thanks

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Question - traffic network with Select * from table and FetchRows = 25

Post by AlexP » Fri 27 Jul 2012 09:33

Hello,

The FetchRows property only produces an effect if the FetchAll option is set to false, in this case, for one call to the database, as many entries will be read out as it was specified in the FetchRows property, when scrolling to the next record (FetchRows+1) the next set of records will be returned. When setting these propertiesnetwork load decreases, as the data is read as needed. When changing the FetchRows value, significant performance improvement can be achieved. The optimum value should be chosen experimentally, as performance depends on a database, the server and client computer network settings.
If the FetchAll property is set to True, then, independendently on the FetchRows value, all the data from the table will be loaded to the client when opening the DataSet.

Post Reply