469,342 Members | 5,363 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,342 developers. It's quick & easy.

getstring really slow

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
Jul 19 '05 #1
9 2503
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" <se*********@blueyonder.co.uk> wrote in message
news:T5***************@news-binary.blueyonder.co.uk...
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

Jul 19 '05 #2
"Seán Meehan" <se*********@blueyonder.co.uk> wrote in message
news:T5***************@news-binary.blueyonder.co.uk...
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
Jul 19 '05 #3
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!
Jul 19 '05 #4

"Chris Hohmann" <hohmannATyahooDOTcom> wrote in message
news:%2*****************@TK2MSFTNGP11.phx.gbl...
"Seán Meehan" <se*********@blueyonder.co.uk> wrote in message
news:T5***************@news-binary.blueyonder.co.uk...
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
Jul 19 '05 #5
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" <an*******@devdex.com> wrote in message
news:uB**************@TK2MSFTNGP10.phx.gbl...
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!

Jul 19 '05 #6
"Seán Meehan" <se*********@blueyonder.co.uk> wrote in message
news:cy****************@news-binary.blueyonder.co.uk...

"Chris Hohmann" <hohmannATyahooDOTcom> wrote in message
news:%2*****************@TK2MSFTNGP11.phx.gbl...
"Seán Meehan" <se*********@blueyonder.co.uk> wrote in message
news:T5***************@news-binary.blueyonder.co.uk...
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

Jul 19 '05 #7
Check out HTML table optimization / optimisation eg.:

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

Chris.

"Seán Meehan" <se*********@blueyonder.co.uk> wrote in message
news:T5***************@news-binary.blueyonder.co.uk...
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

Jul 19 '05 #8
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


Jul 19 '05 #9
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" <an*******@devdex.com> wrote in message
news:uB**************@TK2MSFTNGP10.phx.gbl...
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!

Jul 19 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Paul K | last post: by
3 posts views Thread by GTi | last post: by
7 posts views Thread by Fredrik Melin | last post: by
3 posts views Thread by michael | last post: by
4 posts views Thread by cok | last post: by
1 post views Thread by mikfrost | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.