Re: Performance issue
- From: Philip Germanos <PhilipGermanos@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 13 Jun 2005 04:18:02 -0700
I have two queries to make and two data to display in a datagrid.
1) first query and first data to display:
a)query: the user enters some characters, the query selects the rows from
the table
that have a primary which begins with this sequence of characters.
b)dislay: the primary key of these selected rows are displayed in a datagrid
(one column).
2)Second query and second data display:
a)query: the user selects one row from the rows in the datagrid, the query
consists of selecting all the attributes of the selected row(28 attributes)
b)all the attributes of this single row are than displayed in the datagrid.
Which scenario do i choose for having the best possible performance knowing
that rows have 28 attributes and the table contains up to 10.000 row.
Thank you.
"Darren Shaffer" wrote:
> The fastest thing to do is not to use data binding -or-
> SqlCeDataAdapters. The fastest thing for a single
> row retrieval is Table Direct mode with Seek on an index.
>
> To return a set of records, simply ExecuteQuery and
> read each returned record using SqlCeDataReader,
> manually placing the results into a DataTable which can
> then be bound to a DataGrid. SqlCeDataAdapter is
> going to be somewhat slow for large result sets.
>
> It's not clear from your post if you really require data binding
> or what the size of your result set is, which would both
> affect my recommendation.
>
> If you were using CF2.0 and SQLMobile, this would be
> an easy answer - SqlCeResultSet is exponentially faster than
> the approaches above and supports binding and bi-directional
> cursor movement through a resultset.
>
> --
> Darren Shaffer
> ..NET Compact Framework MVP
> Principal Architect
> Connected Innovation
> www.connectedinnovation.com
>
> "Philip Germanos" <PhilipGermanos@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
> message news:21ADBDD4-0684-45FC-8727-C3DC1AE0DBB1@xxxxxxxxxxxxxxxx
> > Hello,
> >
> > Please which perform better for searching in a sql ce db table:
> >
> > 1) using an sqlCeAdapter and querying the table then loading a datatable
> > with sqlCeAdapter and bind it to a data grid or
> >
> > 2)Loading the datatable using the sqlCeAdapter with all the table data
> > then
> > searching in the datatable then bind it to the data grid
> >
> > Thank you.
>
>
>
.
- References:
- Performance issue
- From: Philip Germanos
- Re: Performance issue
- From: Darren Shaffer
- Performance issue
- Prev by Date: Re: SQL CE 2.0 update for SQL 2000 SP4 released
- Next by Date: Picture from SQLDerverCE-DB to Picturebox?
- Previous by thread: Re: Performance issue
- Next by thread: Memory Leak with SqlCe: ExecuteNonQuery...
- Index(es):
Relevant Pages
|