Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6773029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:37:06+00:00 2026-05-26T15:37:06+00:00

There is Windows Phone 7 app using SQL CE database. I need to delete

  • 0

There is Windows Phone 7 app using SQL CE database. I need to delete 1000-2000 rows. There is no other choice than using LINQ To SQL on Windows Phone 7 Mango – SQL CE database.

What I do is extremaly simple (pseudocode):

Entity[] tmp = null;
do
{
    tmp = datacontext.mytable.Where( ...expression here ...).Take(200).ToArray();
    if (temp.Length > 0)
    {
        mytable.DeleteAllOnSubmit(tmp);
        datacontext.SubmitChanges();
    }
} while (temp.Length > 0);

The problem is that deleting 200 rows takes 7 seconds! All time is taken inside datacontext.SubmitChanges().

Is there any way to make it faster?

Any option to use ‘batch delete’? (‘batch_insert’ would be also welcome)

A few technical details:

  • DataContext was created by SqlMetal tool and it looks rather heavy.
  • Entity has 2 foreign key relations.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:37:07+00:00Added an answer on May 26, 2026 at 3:37 pm

    Perhaps somebody find it usefull:
    Best practises for win phone

    I used a few hints from article above plus redesigned algorithm that it tries to modify (recycle) records instead of delete/insert commands. It gave noticeable performance gain, but still comparing the same application on Android and WinPhone it seems WP7 is much slower.

    Unfortunatelly I suspect it’s way better to use SqlLite for database heavy apps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to make Windows Mobile not use the main phone app?
Whilst building a Windows Phone 7 app. using the MVVM pattern we've struggled to
I'm working on a Windows Phone 7 app using WCF for communications with my
I am building a prototype of a windows phone 7 app using d:DesignData in
Lets set the stage Doing a windows phone app, and trying to authenticate using
In my Windows Phone 7 app I'm using a SearchTask to show the results
Hello there fellow developers! I am working on a Windows Phone 7 app and
I'm developing a Windows Phone app. I'm using an image and when I select
I have a pivot windows phone 7 app on which there is a bing
Are there some resources where one can learn how to develop for Windows Phone

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.