On Mar 29, 2010, at 10:50 AM, Kumar, Abhinav wrote:

> Hi,
>
> I am using SQLite version 3.5.9. My db sizes are 50-100 Gb. My DB is  
> a typical star schema. I am seeing an order of magnitude more time  
> to do a simple select query when doing over NFS (30-60 seconds) as  
> compared to local disk (2 seconds). Is there any way to optimize  
> this ?


No.

In any SQL database implementation (any non-SQL database too) the  
database engine itself normally does a lot of filtering of content  
before handing the results over to the application.  So if you will  
imagine three boxes -- the disk drive, the database engine, and the  
application -- the traffic between the database engine and the disk  
drive is normally much larger than the traffic between the database  
engine and the application.

Now, if the disk drive is separated from the application by a network,  
at some point you are going to need to move content across the  
network.  Because the network is normally the slowest piece of  
hardware, you normally want to minimize the amount of traffic you move  
over the network.  For that reason, you want the database engine and  
the disk drive to be on the same side of the network, not on opposite  
sides.  The link between the database engine and the application  
should be the one that spans the network, since that is your lowest  
bandwidth link.

Hence, if you have an NFS disk, you really ought to be using a client/ 
server database engine which will allow you to position the database  
engine on the server so that it can talk to the disk directly and  
without a network hop.


D. Richard Hipp
d...@hwaci.com



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to