Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Posts
    72

    Unanswered: very slow time to open recorsdet distinct

    open connection
    Code:
    Public Sub CHECK_CONNESSIONE()
        If CONN Is Nothing Then
                Set CONN = New ADODB.Connection
                With CONN
                    .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\ASS_MF\DATABASE\BA.mdb;Persist Security Info=False"
                    .CommandTimeout = 0
                    .CursorLocation = adUseClient
                    .Open
                End With     
        End If
    End Sub
    open recorset
    Code:
    Dim objCommand As ADODB.Command
    
        Set objCommand = New ADODB.Command
        With objCommand
            .ActiveConnection = CONN
            .CommandText = "SP"
            .CommandType = adCmdStoredProc
            Set RS = .Execute
            Set objCommand = Nothing
        End With
    sql qury:
    Code:
    SELECT TOT.DATA_OPE, TOT.SP_MF
    FROM TOT_ASSEGNI
    GROUP BY TOT.DATA_OPE, TOT.SP_MF
    HAVING (([TOT].[SP_MF]="SP"));
    i use vb6 classic

    Into table1 are approx 180.000
    into table are a filed named DATES (is just indexed, dupes YES)

    i open the recordset of DATES (as date short) with to select distinct dates:

    possible the time to return recordset is approx 5 minutes??????????????????????????'

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so where is the time going
    what I'd suggest you do is put swoem debug messages and work out what is consuming the time
    check what columns are indexed
    get some metrics on where resources and or time are being consumber
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •