1. I have a table with 10000 records (Using TMSTable component).
2. I am opening it with:
Cursortype = ctDefaultResultSet;
FetchAll = false;
FetchRows = 25;
ParamCheck:=true;
Options.QuoteNames:=true;
Options.FullRefresh:=true;
Options.LongStrings:=False;
Options.QuoteNames:=true;
Options.TrimFixedChar:=true;
Options.TrimVarChar:=true;
Options.RemoveOnRefresh:=true;
Options.AutoPrepare:=False;
3. According to the manual, opening this table should be prompt, due the small amount of initial fetching records, but it is not. It takes about 1 minute.
4. Even if I reduce or augment the fetchrows property, it does not seem to have any influence over the opening time.
5. What could possibly be the reason? How can I assure the initial retrieved set size is that I set up in Fetchrows?
6. The DBMonitor sentence, each time I open it, is "Select * from table". How does MSSQL "know" about the fetchrows number, since I am sending only that sentence thru network?
Thanks for any help.
how does fetchall work?
When setting TCustomMSDataSet.FetchAll = False you should keep in mind that execution of such queries blocks current session. In order to avoid blocking OLE DB creates additional session. Most possible creation of additional session takes so much time.According to the manual, opening this table should be prompt, due the small amount of initial fetching records, but it is not. It takes about 1 minute.
Even if I reduce or augment the fetchrow property, it does not seem to have any influence over the opening time.
This is feature of OLE DB provider.How does MSSQL "know" about the fetchrow if I am sending only that sentence thru network?
-
- Posts: 43
- Joined: Fri 14 Oct 2005 13:45
how does FetchAll work
Then, Are you suggesting that amount of time spent in the blocking of the current session and the creation of new ones does not compensate the tiny retrieval of records during the table's opening process?
Why, or rather, when should I use fetchall=false, then, if not to speed the opening process?
Is there a way to circumvent this obstacle (long opening time) using another strategy than fetchAll=false? (taking in account that I am not talking neither about a detail table, nor a filtered table).
Thank you for you help.
Why, or rather, when should I use fetchall=false, then, if not to speed the opening process?
Is there a way to circumvent this obstacle (long opening time) using another strategy than fetchAll=false? (taking in account that I am not talking neither about a detail table, nor a filtered table).
Thank you for you help.