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
Question - traffic network with Select * from table and FetchRows = 25
-
rrcanalista
- Posts: 12
- Joined: Mon 06 Feb 2012 20:53
Re: Question - traffic network with Select * from table and FetchRows = 25
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.
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.