1

I'm writing a relatively small single user winforms lottery application. Most of the time it will just fetch data (tickets) from a webservice and then, on saturdays, it will realize the lottery draw. As the balls are drawn, a query will run to display how many tickets are in for a win. After four balls are drawn the app will display the winning tickets.

By the time of the draw, there will be from one to eight million rows (tickets) in the database, so my question is if SQL CE 4.0 is able to handle this task.

Henrique Miranda
  • 1,030
  • 1
  • 13
  • 31
  • Probably the best way would be to test this? Insert 8 millions rows to a table, query it, decide if the performance is sufficient? – Smudge202 Jul 08 '11 at 14:40
  • I did it, performance wasn't good enough. About 15 seconds per query. I wonder if there's any embedded solution that bring it down to at least 2 seconds. – Henrique Miranda Jul 14 '11 at 12:55

1 Answers1

1

Remember there is a 4 GB limit per database file. But the lookup should work fine, you should probably look into bypassing the query processor by use Seek - http://msdn.microsoft.com/en-us/library/system.data.sqlserverce.sqlcedatareader.seek(v=VS.90).aspx - but it would be easier to advice you, if you could share your table schema

ErikEJ
  • 40,951
  • 5
  • 75
  • 115
  • I still have to give this alternative a try. I'm curious about one thing, tho: I populated a table (id field + 4 tinyint fields for the balls) with 7 million combinations (no indexing in the balls fields) and each query took about 15 secs... created indexes and the query still took 15 secs, no improvements at all. – Henrique Miranda Jul 14 '11 at 13:06
  • I need to see your table schema or database with data + your query in order to advise you. Seek will be faster than "SELECT..." You can contact me directly via my blog, if needed. – ErikEJ Jul 14 '11 at 14:30