Re: Download Speed

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Stephen Howe (stephenPOINThoweATtns-globalPOINTcom)
Date: 03/16/04

  • Next message: Filipe Carneiro: "MDAC 2.8 Primary Interop Assembly (PIA) / PIA download site"
    Date: Tue, 16 Mar 2004 19:56:51 -0000
    
    

    > A quick addenda to that last message of mine. After going back and
    testing again, I can make the call to pRec->Open("SP_NAME", .......) or I
    can call pRec->Open(pCommand, .......) where pCommand is a command object
    and with everything set to server side will pull down a minimal amount of
    data. If I do a pRec = pCommand->Execute(....) it pulls down all the data
    at once regardless of settings. Thank you again Steve for getting me
    pointed in the right direction and this issue remedied.

    I understand what your doing but I am perplexed as top why it is necessary
    and results.

    1. The fastest cursor (because it is so limited in terms of what it offers)
    out, under SQL Server, is server-sided,readonly,forwardonly. There is some
    evidence that a Recordset's CacheSize (which defaults to 1) makes a
    difference for server-sided cursors. There are less trips to the database.

    2. If you do

    pRec = pCommand->Execute(....)

    then you have no control on the RecordSet, you should (in theory) get the
    defaults.
    And that means, if the Connection CursorLocation is Server-sided, you should
    get back Forward only, Readonly, Server Sided RecordSet, CacheSize = 1. And
    if the
    Connection CursorLocation is Client-sided, you should get back Static,
    Readonly, Client Sided RecordSet

    I would be tempted to print out the pRec values for CursorLocation,
    CursorType, LockType, CacheSize to see what is going on. This is what
    baffles me.

    3. If you do

    pRec->Open(pCommand, .......)

    you have much more control on the RecordSet that gets returned. You can
    setup all the parameters of the Recordset before the Open() method.

    Stephen Howe


  • Next message: Filipe Carneiro: "MDAC 2.8 Primary Interop Assembly (PIA) / PIA download site"

    Relevant Pages

    • Re: Download Speed
      ... location to server and I call my select statement directly ... The Connection "CursorLocation" is the default cursorlocation of a ... If you don't bother setting a "CursorLocation" for a RecordSet, ... "CursorLocation" is so that you can override what is the Connection default ...
      (microsoft.public.data.ado)
    • RE: TransferText from a table with a selection-parameter
      ... > temporary table where I store the recordset inside because there may be ... Each of your users can use separate temp tables in your SQL Server database. ...
      (microsoft.public.access.modulesdaovba)
    • Re: VB-ADO-SQL Server : SQL Server performs logins after some queries
      ... The reason that I use Object types is that my code should work ... with a SQL Server 2K database (at a internet server) as well as MS Access ... recordset to a ADODB.recordset or a DAO recordset prior to creating the ...
      (microsoft.public.vb.database.ado)
    • Re: Was ist schneller und DB-verträglicher - FIND oder SELECT ?
      ... Dein Code ist insofern performant, ... Ich würde mir ALLE Daten in ein lokales RecordSet holen und dieses RecordSet ... Set cmd = New ADODB.Command ... ' Verbindung zum Server trennen... ...
      (microsoft.public.de.sqlserver)
    • Re: ADO Recordset vs Command and AD
      ... The CursorLocation can be set on the connection prior to opening the ... This CursorLocation is applied to the recordset opened on this ... Open method of a Recordset object, so you can assign the cursorType ... CommandText property of a Command object so you can turn on paging and use ...
      (microsoft.public.scripting.vbscript)