getstring really slow

Discussion in 'ASP General' started by Seán Meehan, Jul 16, 2003.

  1. Seán Meehan

    Seán Meehan Guest

    Hi,

    Hope somebody can help because i've looked everywhere else fo ran answer.
    I'm connecting to an Access table with 100+ rows of data of approx 20
    columns wide. I'm using getstring to "Quickly" display it in a table, but
    it's un-useably slow. Any suggestions?

    Thanks

    Seán
    Seán Meehan, Jul 16, 2003
    #1
    1. Advertising

  2. Seán Meehan

    Ray at Guest

    Code? How many people are accessing the site? Are you destroying your
    objects? Does the server have a 66MHz PI?

    Ray at work

    "Seán Meehan" <> wrote in message
    news:T5fRa.1788$...
    > Hi,
    >
    > Hope somebody can help because i've looked everywhere else fo ran answer.
    > I'm connecting to an Access table with 100+ rows of data of approx 20
    > columns wide. I'm using getstring to "Quickly" display it in a table, but
    > it's un-useably slow. Any suggestions?
    >
    > Thanks
    >
    > Seán
    >
    >
    Ray at, Jul 16, 2003
    #2
    1. Advertising

  3. "Seán Meehan" <> wrote in message
    news:T5fRa.1788$...
    > Hi,
    >
    > Hope somebody can help because i've looked everywhere else fo ran

    answer.
    > I'm connecting to an Access table with 100+ rows of data of approx 20
    > columns wide. I'm using getstring to "Quickly" display it in a table,

    but
    > it's un-useably slow. Any suggestions?
    >
    > Thanks
    >
    > Seán
    >
    >

    Here's an excellent article on using GetString, GetRows and recordset
    iteration. <g>

    http://www.aspfaq.com/show.asp?id=2467

    Specifically, check out the Analysis:GetString:pros section that
    discusses the use of the NumRows parameter to output a "burst" of rows.

    HTH
    -Chris
    Chris Hohmann, Jul 16, 2003
    #3
  4. Seán Meehan

    Seán Meehan Guest

    Ray,

    I'm the only one using it at the moment for testing. It's sitting on a
    dual pII 200 machine running NT4 Server. It only seems to be when I'm
    trying to put the data into a table format. I've tried reading the
    recordset into an array using getrows, closing the recordset and
    connection and then building the table and there was no speed
    difference, Yet if I just response.write straight to the screen it
    displays in seconds. This rules out the database side slowing it down,
    wouldn't you agree? Any help would be appreciated as it's driving me
    mad.

    Thanks Again,

    Seán

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Seán Meehan, Jul 16, 2003
    #4
  5. Seán Meehan

    Seán Meehan Guest

    "Chris Hohmann" <hohmannATyahooDOTcom> wrote in message
    news:%23%...
    > "Seán Meehan" <> wrote in message
    > news:T5fRa.1788$...
    > > Hi,
    > >
    > > Hope somebody can help because i've looked everywhere else fo ran

    > answer.
    > > I'm connecting to an Access table with 100+ rows of data of approx 20
    > > columns wide. I'm using getstring to "Quickly" display it in a table,

    > but
    > > it's un-useably slow. Any suggestions?
    > >
    > > Thanks
    > >
    > > Seán
    > >
    > >

    > Here's an excellent article on using GetString, GetRows and recordset
    > iteration. <g>
    >
    > http://www.aspfaq.com/show.asp?id=2467
    >
    > Specifically, check out the Analysis:GetString:pros section that
    > discusses the use of the NumRows parameter to output a "burst" of rows.
    >
    > HTH
    > -Chris
    >
    >

    Excellent article Chris, although I wouldn't have thought 100 or so records
    was a large amount of data to read in? I'm just doing a "Select * from
    table" at the moment and I'm going to try defining the columns instead and
    see whether that helps. If I ever solve this one I'll get back to you.

    Regards,

    Seán
    Seán Meehan, Jul 16, 2003
    #5
  6. Seán Meehan

    Ray at Guest

    Post the relevant code snippet. One way to speed things up would be to not
    do a select *. Instead, do a select [something],[somethingelse],etc. But,
    I doubt that's what is causing your slowness issue.

    Ray at work

    "Seán Meehan" <> wrote in message
    news:...
    > Ray,
    >
    > I'm the only one using it at the moment for testing. It's sitting on a
    > dual pII 200 machine running NT4 Server. It only seems to be when I'm
    > trying to put the data into a table format. I've tried reading the
    > recordset into an array using getrows, closing the recordset and
    > connection and then building the table and there was no speed
    > difference, Yet if I just response.write straight to the screen it
    > displays in seconds. This rules out the database side slowing it down,
    > wouldn't you agree? Any help would be appreciated as it's driving me
    > mad.
    >
    > Thanks Again,
    >
    > Seán
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Ray at, Jul 16, 2003
    #6
  7. "Seán Meehan" <> wrote in message
    news:cygRa.2980$...
    >
    > "Chris Hohmann" <hohmannATyahooDOTcom> wrote in message
    > news:%23%...
    > > "Seán Meehan" <> wrote in message
    > > news:T5fRa.1788$...
    > > > Hi,
    > > >
    > > > Hope somebody can help because i've looked everywhere else fo ran

    > > answer.
    > > > I'm connecting to an Access table with 100+ rows of data of approx

    20
    > > > columns wide. I'm using getstring to "Quickly" display it in a

    table,
    > > but
    > > > it's un-useably slow. Any suggestions?
    > > >
    > > > Thanks
    > > >
    > > > Seán
    > > >
    > > >

    > > Here's an excellent article on using GetString, GetRows and

    recordset
    > > iteration. <g>
    > >
    > > http://www.aspfaq.com/show.asp?id=2467
    > >
    > > Specifically, check out the Analysis:GetString:pros section that
    > > discusses the use of the NumRows parameter to output a "burst" of

    rows.
    > >
    > > HTH
    > > -Chris
    > >
    > >

    > Excellent article Chris, although I wouldn't have thought 100 or so

    records
    > was a large amount of data to read in? I'm just doing a "Select * from
    > table" at the moment and I'm going to try defining the columns instead

    and
    > see whether that helps. If I ever solve this one I'll get back to you.
    >
    > Regards,
    >
    > Seán
    >
    >

    Can you post some code? What's your content to formatting ratio? What I
    mean is:

    <style type="text/css">
    td{
    [[Your style definition for the td tag here]]
    }
    </style>
    ....
    <td>blah blah blah</td>
    <td>blah blah blah</td>
    <td>blah blah blah</td>
    ....

    Is better than:

    ....
    <td [[A whole bunch of inline style stuff]]>blah blah blah</td>
    <td [[A whole bunch of inline style stuff]]>blah blah blah</td>
    <td [[A whole bunch of inline style stuff]]>blah blah blah</td>
    ....

    HTH
    -Chris
    Chris Hohmann, Jul 16, 2003
    #7
  8. Seán Meehan

    Chris Barber Guest

    Check out HTML table optimization / optimisation eg.:

    http://www.websiteoptimization.com/speed/4/

    Chris.

    "Seán Meehan" <> wrote in message
    news:T5fRa.1788$...
    > Hi,
    >
    > Hope somebody can help because i've looked everywhere else fo ran answer.
    > I'm connecting to an Access table with 100+ rows of data of approx 20
    > columns wide. I'm using getstring to "Quickly" display it in a table, but
    > it's un-useably slow. Any suggestions?
    >
    > Thanks
    >
    > Seán
    >
    >
    Chris Barber, Jul 16, 2003
    #8
  9. Try using GetRows and retrieving 1 to 10 records at a time like this:

    ' Prepare a SQL query string
    strsql = "SELECT Field1,Field2,Field3,Field4 FROM tblData"

    ' Execute the SQL query and set the implicitly created recordset
    Set objRS = objCN.Execute(strsql)

    ' Write out the results using GetRows in a loop
    Response.write "<pre>"
    Do While Not objRS.EOF
    RecordsArray = objRS.GetRows(10)

    ' Print out the array
    For i = 0 To UBound(RecordsArray, 2)
    Response.write RecordsArray(0, i)
    Response.write vbTab
    Response.write RecordsArray(1, i)
    Response.write vbTab
    Response.write RecordsArray(2, i)
    Response.write vbTab
    Response.write RecordsArray(3, i)
    Response.write vbTab
    Response.write vbCrLf
    Next
    Loop
    Response.write "</pre>"

    Seán Meehan wrote:
    > Hi,
    >
    > Hope somebody can help because i've looked everywhere else fo ran answer.
    > I'm connecting to an Access table with 100+ rows of data of approx 20
    > columns wide. I'm using getstring to "Quickly" display it in a table, but
    > it's un-useably slow. Any suggestions?
    >
    > Thanks
    >
    > Seán
    >
    >
    Shailesh Humbad, Jul 16, 2003
    #9
  10. Seán Meehan

    Tom B Guest

    I believe the 200MHz processors were Pentium Pro's, as if it matters.

    With most browsers, the entire table has to be downloaded and sized before
    it can be displayed.
    Your table is approximately 20 columns by 100 rows, you can speed up the
    table by specifying the widths of your columns.
    Another trick is to flush out part of the table. For example:

    Do While not RS.EOF
    iCount=iCount+1
    Response.write "<tr><td>" 'etc.
    if (iCount mod 10 =0) then
    Response.write "</table><table>"
    Response.flush
    end if
    RS.MoveNext
    Loop

    However, it's even more important to ensure that you specify column widths,
    as your columns may not line up correctly.


    "Seán Meehan" <> wrote in message
    news:...
    > Ray,
    >
    > I'm the only one using it at the moment for testing. It's sitting on a
    > dual pII 200 machine running NT4 Server. It only seems to be when I'm
    > trying to put the data into a table format. I've tried reading the
    > recordset into an array using getrows, closing the recordset and
    > connection and then building the table and there was no speed
    > difference, Yet if I just response.write straight to the screen it
    > displays in seconds. This rules out the database side slowing it down,
    > wouldn't you agree? Any help would be appreciated as it's driving me
    > mad.
    >
    > Thanks Again,
    >
    > Seán
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Tom B, Jul 17, 2003
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nakhi

    datareader.getstring(0) error

    Nakhi, Jul 14, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    2,119
    Nakhi
    Jul 15, 2003
  2. Nakhi
    Replies:
    0
    Views:
    477
    Nakhi
    Jul 15, 2003
  3. iMonkey

    encoder.GetString() help

    iMonkey, Jul 31, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    426
    iMonkey
    Jul 31, 2003
  4. Replies:
    3
    Views:
    3,027
  5. Mat Schaffer

    String#chop slow? REALLY slow?

    Mat Schaffer, Jul 27, 2006, in forum: Ruby
    Replies:
    11
    Views:
    328
    Caio Chassot
    Jul 27, 2006
Loading...

Share This Page