|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Load dataset faster? 45K items in 18 seconds too slowHi. I'm using a table adapter to load a table of 45,000 items, is taking 18
seconds, which is waaaay too slow, esp. since this will grow to many times that size very quickly. I'm currently using a TableAdapeter. Is there a quicker way to load a dataset? Thanks!! Chris B. Filter the result set to what you are actually going to consume?
-- Show quoteGregory A. Beamer MVP; MCP: +I, SE, SD, DBA http://gregorybeamer.spaces.live.com ************************************************* Think outside of the box! ************************************************* "Chris Bordeman" <REMOVE_DUPED_LETTERSccchhrriiiissbbooooorrddeemma***@hhoottmmaaiill.com> wrote in message news:uX5J%23CR$GHA.2300@TK2MSFTNGP04.phx.gbl... > Hi. I'm using a table adapter to load a table of 45,000 items, is taking > 18 seconds, which is waaaay too slow, esp. since this will grow to many > times that size very quickly. > > I'm currently using a TableAdapeter. Is there a quicker way to load a > dataset? > > Thanks!! > > Chris B. > I'm with Greg. Why fetch that many rows?
-- Show quote____________________________________ William (Bill) Vaughn Author, Mentor, Consultant Microsoft MVP INETA Speaker www.betav.com/blog/billva www.betav.com Please reply only to the newsgroup so that others can benefit. This posting is provided "AS IS" with no warranties, and confers no rights. __________________________________ Visit www.hitchhikerguides.net to get more information on my latest book: Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition) Between now and Nov. 6th 2006 you can sign up for a substantial discount. Look for the "Early Bird" discount checkbox on the registration form... ----------------------------------------------------------------------------------------------------------------------- "Chris Bordeman" <REMOVE_DUPED_LETTERSccchhrriiiissbbooooorrddeemma***@hhoottmmaaiill.com> wrote in message news:uX5J%23CR$GHA.2300@TK2MSFTNGP04.phx.gbl... > Hi. I'm using a table adapter to load a table of 45,000 items, is taking > 18 seconds, which is waaaay too slow, esp. since this will grow to many > times that size very quickly. > > I'm currently using a TableAdapeter. Is there a quicker way to load a > dataset? > > Thanks!! > > Chris B. > Chris Bordeman wrote:
> Hi. I'm using a table adapter to load a table of 45,000 items, is I can fetch 50,000 rows with 12 columns of random data with ints,> taking 18 seconds, which is waaaay too slow, esp. since this will > grow to many times that size very quickly. > > I'm currently using a TableAdapeter. Is there a quicker way to load > a dataset? int16's, strings and guids into a datatable in roughly 5.56 seconds (average over 10 runs) and the same rows in 50,000 entity objects in roughly 6.0 seconds (average over 10 runs), so you've to provide more details. For example: what database type are you fetching data from? And, does your resultset have many many columns and for example blob /clob (text/image) fields? My datatable code uses a simple sqldataadapter, which IMHO is the tableadapter's way to fetch data as well. FB -- ------------------------------------------------------------------------ Lead developer of LLBLGen Pro, the productive O/R mapper for .NET LLBLGen Pro website: http://www.llblgen.com My .NET blog: http://weblogs.asp.net/fbouma Microsoft MVP (C#) ------------------------------------------------------------------------ Thanks for the replies. I realize I can filter the select, but still have
lots of rows. I switched from an Access database to SQL Express and cut it down to 7 seconds, should be quick enough. Thanks. Show quote "Frans Bouma [C# MVP]" <perseus.usenetNOSPAM@xs4all.nl> wrote in message news:xn0et755y4bigj000@news.microsoft.com... > Chris Bordeman wrote: > >> Hi. I'm using a table adapter to load a table of 45,000 items, is >> taking 18 seconds, which is waaaay too slow, esp. since this will >> grow to many times that size very quickly. >> >> I'm currently using a TableAdapeter. Is there a quicker way to load >> a dataset? > > I can fetch 50,000 rows with 12 columns of random data with ints, > int16's, strings and guids into a datatable in roughly 5.56 seconds > (average over 10 runs) and the same rows in 50,000 entity objects in > roughly 6.0 seconds (average over 10 runs), so you've to provide more > details. > > For example: what database type are you fetching data from? And, does > your resultset have many many columns and for example blob /clob > (text/image) fields? > > My datatable code uses a simple sqldataadapter, which IMHO is the > tableadapter's way to fetch data as well. > > FB > > -- > ------------------------------------------------------------------------ > Lead developer of LLBLGen Pro, the productive O/R mapper for .NET > LLBLGen Pro website: http://www.llblgen.com > My .NET blog: http://weblogs.asp.net/fbouma > Microsoft MVP (C#) > ------------------------------------------------------------------------ |
|||||||||||||||||||||||