PDA

View Full Version : How about LARGE RecordSets ?


Tarzzz
09-17-2010, 04:49 PM
Hello.

What about I having 50000 rows in my SQL 2005 table an each columns are about 50 and each are FAT (maybe 100 varchar), and then I do a sql like:

SELECT * from mytable ORDER by mycolumn; ? from an ASP-page. but from an ASP-page...

Of course first creating the object ADOB.recordset.. and so on...


Where does the machine store it ? Will it slow down ? (I guess).

Are there limits ?
All answers welcome.

I hope you know what I mean. I have now 30 records and everything works fine, but what IF.. 50000 more records...


Thanks

//Tarzzz

Old Pedant
09-17-2010, 10:56 PM
And what will you *DO* with that recordset??? You surely wouldn't try to display 50,000 records in a web page. The most I would *ever* show in a single web page would be maybe 100. But I'd far prefer 30 to 50 as the max.

So you *probably* need to find a way to "page" the results. Either simply by showing 100 (or 50 or 30 or 20) at a time with "next" or maybe by giving the user the ability to "filter" the results easily.

So.... tell us how you are going to handle too many records?

Tarzzz
09-18-2010, 01:26 PM
Thanks for the answer Old Pedant.

I absolutely want to do an ALL search, I've already paget it. I was more after if it will be slow..anf "heavy" ?

Add to that if 100 users do the same thing..

But YES, I need ALL the records sometimes..

I know how to narrow it down, but as I said above, sometimes I'll be needing them all.

Forgot... No, of course I will not display all att the same time at a webpage, but in pages. But I want the user to be able to browse all records, page by page. So I'll need all records ?

//Tarzzz

Old Pedant
09-18-2010, 07:20 PM
I will not display all att the same time at a webpage, but in pages. But I want the user to be able to browse all records, page by page. So I'll need all records ?
No. You will, indeed, do paging.

Look here:
http://www.4guysfromrolla.com/webtech/042606-1.shtml

There are other ways to do paging with ADO, but if you are willing to learn how to use a Stored Procedure to do the paging, as shown in that article, it will be much more efficient.