468,268 Members | 1,549 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Fetching Records FROM mssql...

I've got some perfermance issue while fetching data from MSSQL

I have a gridview, the datasource is a objectdatasource, and the
objectdatasource is pointed to the dataset.

The Select Query in dataset is something like "SELECT * FROM myTable"
while the "myTable" has more than 1M records..

While run the project, the ASP.NET seems try to retrieve all the records
before doing some procedure such as Paging or Sorting...

Is there any other method to do increase the performance?

Thanks
Jul 20 '07 #1
4 1620
On 20 Jul, 04:28, "LamSoft" <[nospam]lams...@lamsoft.netwrote:
I've got some perfermance issue while fetching data from MSSQL

I have a gridview, the datasource is a objectdatasource, and the
objectdatasource is pointed to the dataset.

The Select Query in dataset is something like "SELECT * FROM myTable"
while the "myTable" has more than 1M records..

While run the project, the ASP.NET seems try to retrieve all the records
before doing some procedure such as Paging or Sorting...

Is there any other method to do increase the performance?

Thanks
For paging, I use the 1.1 control DataGrid and extend it to allow for
numbered paging. This control allows you to implement custom paging
using VirtualItemCount. You simply pass a count(*) to this for it to
work out the number of pages needed, then you just return the records
for one page. So in an app it doesn't matter if there are 5 million
records in a DB, you'll only ever return 10-15-20 etc at a time. It's
a bit more coding, but it's a lot more efficient.

Jul 20 '07 #2
So in an app it doesn't matter if there are 5 million
records in a DB, you'll only ever return 10-15-20 etc at a time.
But how do you work it so that SQL only results the 10-15-20 records you
want?
Jul 20 '07 #3
Have a read through this for some ideas;

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

(BTW page was not working at time of posting, but if memory serves me it has
the info you need)

"LamSoft" <[nospam]la*****@lamsoft.netwrote in message
news:uI**************@TK2MSFTNGP05.phx.gbl...
I've got some perfermance issue while fetching data from MSSQL

I have a gridview, the datasource is a objectdatasource, and the
objectdatasource is pointed to the dataset.

The Select Query in dataset is something like "SELECT * FROM myTable"
while the "myTable" has more than 1M records..

While run the project, the ASP.NET seems try to retrieve all the records
before doing some procedure such as Paging or Sorting...

Is there any other method to do increase the performance?

Thanks

Jul 20 '07 #4
"LamSoft" <[nospam]la*****@lamsoft.netwrote in message
news:ey**************@TK2MSFTNGP05.phx.gbl...
So if it is necessary to show up those 5 million records, and there is not
where clause or filter, it means that we cannot do this through ASP.NET?
Yes. Even if fetching the 5 million records out of SQL Server was reasonably
fast, it would take ASP.NET simply ages (in computing terms) to render the
HTML output, and even longer for the browser to display it.

As others have hinted, trying to display that amount of data really is
symptomatic of a poor design...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jul 24 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Srinivasan R | last post: by
reply views Thread by Shujun Huang | last post: by
22 posts views Thread by Sandman | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.