"Tom Gao" <(E-Mail Removed)> wrote in message
news:41dbd09a$0$13283$(E-Mail Removed)...
> Hi guys I have 4 million records in a table in one database...
>
> I want to display it in a datagrid... how can I do this efficiently ?
>
> please be specific should I do it in sql server or in .net ?
Step one, turn off ViewState for the Datagrid, and do the query on every
postback.
Next, You'll have to determine for yourself which way is better for your
particular environment. Reading the entire 4M records and letting the
DataGrid figure out which ones to show would probably be the easiest way to
go, but re-selecting 4M records every postback will put a strain on your
data server.
--
Truth,
James Curran
[erstwhile VC++ MVP]
Home:
www.noveltheory.com Work:
www.njtheater.com
Blog:
www.honestillusion.com Day Job:
www.partsearch.com