views:

1004

answers:

6

I'm using MS Access 2007 for insert and read data in my application but it's really slow.

I've got a long running application and if I run it from the memory it takes about 5 minutes, with MS Access 2007 it takes about 13 minutes!

I'm looking for a faster yet portable database option, I'm using .NET . I'm not looking for advanced relational database stuff, as soon as it works like a decent database, it's enough for me.

EDIT :

I'm mostly doing concurrent inserts from multiple threads.

RESULTS

I've tried SQL Server Compact Edition 3.5 SP1 and it's almost same with running from memory so %400 times faster than access + instead of a 72MB of dependency I've got 1.5MB dependency which is great.

*P.S. Database is normalised, clean, compacted and I'm using stored_procedures and native client. So I've tried so many things to make it faster already.*

+7  A: 

SQLite

Romain Verdier
performance-wise is it better? I've seen couple of comments in the forums claims it's better, but couldn't find any benchmark or something like that.
dr. evil
It is faster. Not to put down Access, but almost any database you can use in your situation is faster; Access's strength is in it's end user tools for creating forms and reports.
David
very fast, driver is self contained, no install required... and also very scalable
jle
+2  A: 

SQL Server Express 2008. It's free, and it's SQL Server.

John Saunders
Is it portable like MS Access, copy-paste and connect? without a windows service?
dr. evil
First of all, I suggest you actually try the installer, to see if you can run it with defaults - no UI. Second, if necessary, consider SQL Server Compact Edition, which is more like Access, working with individual files.
John Saunders
Actually my app already can switch to SQL Server 2000 and works fine. So I'm downloading compact edition and see if it works better.
dr. evil
Well actually tried and it's almost the same speed with working on the memory, awesome!
dr. evil
Glad to hear it!
John Saunders
it does not have a self contained driver... requires install of the driver
jle
@jle: Slough didn't seem to mind. See his comment on 4/6/2009. 400% improvement is not too bad.
John Saunders
Downvoter: care to say why you downvoted after all this time?
John Saunders
A: 

Microsoft SQL server worked for my applications, although I would rather use MySQL. I am sure MSSQL has great integration into .NET, though, so it is probably fastest.

Cory Walker
the problems is MSSQL and MySQL are not portable, I don't want to force users to install a database server.
dr. evil
+3  A: 

From the sqlite wiki:

SQLite is the speed demon of choice for systems that don't make heavy use of concurrent connections and complicated database features. If you need a lot of concurrent connections, SQLite probably isn't the best choice. But if you need a lot of speed and a simple setup for a single connection, SQLite is the best thing I've seen.

http://www.sqlite.org/cvstrac/wiki?p=PerformanceConsiderations

You might also want to take a look at mysql, pgsql or mssql (CE or Express (Both Free)), depending on your needs.


Edit: Based on your comments, you will probably need something that runs on a server like mysql, pgsql or mssql (express)


Edit2: If you are mostly doing inserts, make sure you don't have unused indexes in your table, since indexes can make insert/updates a bit slower.

Martin
It's not concurrent connections but more like concurrent inserts coming from so 10-50 threads. BTW thanks for the link.
dr. evil
I've just read the page, I think sqlite will suffer from write locks in my case, according to that page sqlite is not good about that.
dr. evil
+3  A: 

Honestly, I don't think you're going to get much faster results. Your program is probably I/O bound, which means that the speed of the disk is slowing you down.

You can try SQL Compact Edition (CE), but I suspect you will see as slow or slower results from any other tool.

Mystere Man
SQL Compact Edition support stored procedures yet? If so, adjusting for lack of stored procedures can be factored into migration plans.
Leah
+1  A: 

You can also use Firebird : www.firebirdsql.org

It's free and very easy to use. There is some good .net drivers.

If you sell your application : MySQL is not free.

Hugues Van Landeghem