Re: Performance issue



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.
>
>
>
.



Relevant Pages

  • Re: Problem deleting records from datagrid
    ... However the records displayed in the datagrid need to have the description ... I would then need to refresh the data grid to display the changed data ... >> Yes, there are two tables in this query and one does have a primary key, ...
    (microsoft.public.vb.general.discussion)
  • DBRW generating ADODB.Command error 800a0cc1
    ... I am trying to create a page on my site that will display a list of locations ... from my Access DB that are within a specified radius of a Zip Code selected ... My first query ... happy just to get the results of this first query to display on the first ...
    (microsoft.public.frontpage.programming)
  • Re: Problem deleting records from datagrid
    ... > the required data in a datagrid. ... using ADO, and a good grid. ... there are two tables in this query and one does have a primary ...
    (microsoft.public.vb.general.discussion)
  • RE: Datagrid fails to fill
    ... and if I take that query string and use it exactly in Query ... >> the datagrid to display data. ... >> End Sub ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Display 1st 10 records, next 10 records using SQL?
    ... fields you want to display from your table and include Selected. ... click in the query window. ... Create another query based on the first query. ... Create a third Update query that resets Selected in all the records to False. ...
    (microsoft.public.access.formscoding)