+ Reply to Thread
Results 1 to 2 of 2

pivot table from recordset - very slow performance

  1. #1

    pivot table from recordset - very slow performance

    I'm recoding a spreadsheet to use SQL server, instead of local SAS
    table/files, and although the data coming from the server via ADO and
    stored procs is retrieved rapidly, the pivot table I build from the
    recordset takes a very long time, about 3 times as long as before (now
    taking approx 2 minutes), and although the recordset size is 86000 rows
    by 25 columns, the data is not the issue, just how long it takes to
    build the table.

    Since the recordset via ADO is not the problem, I'll just display the
    basic text of building the pivot table from the data:


    'sets pivot cache, in prep for table, and then chart
    Set objpcache = ActiveWorkbook.PivotCaches.Add(SourceType:=xlExternal)

    Set objpcache.Recordset = rstSQLServer
    With objpcache
    .CreatePivotTable TableDestination:=DestinRange,
    TableName:="level_1"
    End With


    The lline that is taking so long is the With/End With code. I've tried
    modifying the recordset values, changing various options, but none make
    a difference. Any suggestions?


    James Igoe || [email protected] ||
    http://code.comparative-advantage.com


  2. #2

    Re: pivot table from recordset - very slow performance


    I eventually solved my own problem or at least found out what the issue
    was. It was not an issue with code, but an issue of locations and data
    transmission. The application was in Boston, but the SQL server was in
    NY.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1