Re: Performance problem in sql ce
- From: Gagan <Gagan@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 21 Apr 2008 08:13:00 -0700
Hi Jin,
Thanks your suggestion works i tried with this
SqlCeResultSet rs = CeCommand.ExecuteResultSet(ResultSetOptions.Scrollable);
For query, with where clause i was getting result in 1 min now i am getting
result in 10 sec. I can use this on many places to improve performance.
Previously i was using
CeDataAdapter = new SqlCeDataAdapter(CeCommand);
to fill the result in dataset.
But the problem is still same for the query which is taking > 15 min.
By saying programmatically joins means first create separate result sets for
all tables then start filtering or some thing else please clear.
Another problem is that i am using dataset every where. After getting
results for filtering, sorting and showing on UI. Can we convert result set
object to dataset directly or i have to work with resultset only. i am not
much familiar with this object and i don't have much time for r&d.
"Jin" wrote:
On Apr 21, 4:26 am, Gagan <Ga...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:.
Hi,
I am very disappointed with the sql queries performance in sql ce. In my
some queries i have inner joins on 9 tables some tables have more then 150000
records. Db size is around 15 MB. If i run that query with particular where
clause (ex RoomNo. = 100) then it gives result in 1 minute otherwise i wait
for 15 min. & i did not get results. However i am using proper indexing on
SARG still response time is not acceptable. I also tried by putting db on sd
card doesn't work.
Can any body help me to find out where i am wrong or the limitations of sql
ce queries.
150,000 records sounds a bit too much for mobile application to
handle. Couple that with joins on 9 tables, I wouldn't expect good
performance at all. Ginny's suggestion of denormalization is a good
one if you can afford to make the changes. Another approach might be
to avoid the joins as much as possible and go with programmatic joins
via the SqlCeResultSet. This approach will at least allow you to have
a bit more control over the performance bottlenecks.
- Jin
- Follow-Ups:
- Re: Performance problem in sql ce
- From: Jin
- Re: Performance problem in sql ce
- From: Ginny Caughey MVP
- Re: Performance problem in sql ce
- References:
- Performance problem in sql ce
- From: Gagan
- Re: Performance problem in sql ce
- From: Jin
- Performance problem in sql ce
- Prev by Date: Re: Performance problem in sql ce
- Next by Date: Re: Performance problem in sql ce
- Previous by thread: Re: Performance problem in sql ce
- Next by thread: Re: Performance problem in sql ce
- Index(es):
Relevant Pages
|