Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Single User Performance of SQLite v. SQL Server Expand / Collapse
Author
Message
Posted Wednesday, July 18, 2012 10:31 PM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Thursday, November 20, 2014 4:22 PM
Points: 752, Visits: 918
Comments posted to this topic are about the item Single User Performance of SQLite v. SQL Server

---
Timothy A Wiseman
SQL Blog: http://timothyawiseman.wordpress.com/
Post #1331905
Posted Thursday, July 19, 2012 3:02 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, July 23, 2012 3:23 AM
Points: 1, Visits: 5
0.718 secs for 5000 inserts SQL Server (commit once)
0.047 secs for 5000 inserts SQLite (commit once)

"it goes from being substantially slower than SQL Server to slightly faster."

..... for 'slightly' read 15x faster ! For any 'embedded' application sqlite knocks the spots off SQL server - but it it really is an apples and oranges comparison.
Post #1332011
Posted Thursday, July 19, 2012 4:12 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, December 20, 2013 2:19 AM
Points: 21, Visits: 72
The whole basis of this article is undermined because the author picked an unsuitable edition of SQL Server for comparison: SQL Server Compact would be the equivalent product and would have made for a more interesting article.
Post #1332057
Posted Thursday, July 19, 2012 5:34 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 6:51 AM
Points: 29, Visits: 232
This really misses the point. SQLite is an embedded data store in a single C library. SQL server is, well... A server. It has an instillation and configuration process, can be accessed by multiple processes, has granular permissions and a whole bunch of very important stuff.

If you don't need that stuff and you can just use the embedded data store, just use SQLite and get on your way. This is worse than an apples to oranges comparison. More like apples to an apple stand.

SQLite is great for what it does, I have used it many times. But I am not really sure about the utility of comparing it to SQL Server.
Post #1332096
Posted Thursday, July 19, 2012 5:59 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, May 29, 2014 1:06 PM
Points: 30, Visits: 172
I use SQL server Access and Oracle, but I have used SQLite and considering the size and function SQLite. It has it's place and again, the footprint is so small. It is great for embedding in smart phone apps, for retaining settings on webservers and client apps for quick prototypes as well. Another benefit is that it can be used on most platforms.

As suggested earlier I would also suggest doing more performance metrics but against SQL CE

Also the newer versions of SQLite (3.7) has Write ahead locking

And there's nothing like being able to drag and drop a few files and your
code runs without having to install SQL server on 150 users desktops
with different OS versions just to read a table.

We still lean heavily on MS Access but there is a lot of code maintenance with ever newer releases since we have different versions in use.


"There is nothing so useless as doing efficiently that which should not be done at all." - Peter Drucker
Post #1332111
Posted Thursday, July 19, 2012 11:10 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, November 16, 2014 4:45 PM
Points: 159, Visits: 187
Nice article and thank you for putting together the comparison.

One of the reasons that any embedded solution will be faster is related to the overhead of client/server communications... There is a penalty for every connection to SQL Server. For small record sets and optimized code it's very hard to overcome that penalty. I'm curious if instead of 5000 rows if your query were a million rows (Not that much today) would SQL come back out on top?

Of course another reason that embedded solutions are faster has to do with SQLserver being optimized for Muti-User, To compare to an embedded solution the database should be put into Single-User mode.

Post #1332393
Posted Thursday, July 19, 2012 11:36 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 10:24 AM
Points: 322, Visits: 825
Nice article, very interesting.


Post #1332422
Posted Friday, July 20, 2012 4:26 PM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Thursday, November 20, 2014 4:22 PM
Points: 752, Visits: 918
iposner (7/19/2012)
The whole basis of this article is undermined because the author picked an unsuitable edition of SQL Server for comparison: SQL Server Compact would be the equivalent product and would have made for a more interesting article.


You make an excellent point. I may have to take a look at compact edition.


---
Timothy A Wiseman
SQL Blog: http://timothyawiseman.wordpress.com/
Post #1333277
Posted Friday, July 20, 2012 4:29 PM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Thursday, November 20, 2014 4:22 PM
Points: 752, Visits: 918
ddriver (7/19/2012)

If you don't need that stuff and you can just use the embedded data store, just use SQLite and get on your way. This is worse than an apples to oranges comparison. More like apples to an apple stand.

SQLite is great for what it does, I have used it many times. But I am not really sure about the utility of comparing it to SQL Server.


A fair point. The reason I started looking into it is that I had been writing all of my applications against SQL Server until I started getting requests to write applications that would be used by only one at a time for certain niche functions. So, for those I started playing with SQLite, and readily having the option of either I wanted to know the performance implications of the choice.


---
Timothy A Wiseman
SQL Blog: http://timothyawiseman.wordpress.com/
Post #1333279
Posted Friday, July 20, 2012 4:31 PM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Thursday, November 20, 2014 4:22 PM
Points: 752, Visits: 918
krefior (7/19/2012)
Nice article and thank you for putting together the comparison.

One of the reasons that any embedded solution will be faster is related to the overhead of client/server communications... There is a penalty for every connection to SQL Server. For small record sets and optimized code it's very hard to overcome that penalty. I'm curious if instead of 5000 rows if your query were a million rows (Not that much today) would SQL come back out on top?


I have not tried a million rows yet, but for half a million the basic trend stayed the same.


---
Timothy A Wiseman
SQL Blog: http://timothyawiseman.wordpress.com/
Post #1333280
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse