Reputation: 96
I am making an online app in which when I sync my data web then 25 to 30 local database queries in different tables are executed. So it will take around 25 to 30 sec because all database queries are execute in this manner, first check that data is present or not in local database if present then row is update otherwise insert. Now I want to ask that there are any way through which I can execute these all queries concurrently. If I can do this then I can save my 10 to 15 sec in every sync. So please gave a better solution to execute multiple queries.
Upvotes: 3
Views: 667
Reputation: 5602
If all queries you want to execute that relates to the different table then in that case you can create the Separate Database File for every Table.
Upvotes: 1
Reputation: 2048
It is not possible to run 2 or more than two queries at a single time cause when 1 query runs it locks the DataBase.
Upvotes: 1
Reputation: 54222
Consider using High Performance database management system such as cubeSQL :
SQLabs has announced the release of cubeSQL a fully featured and high performance relational database management system built on top of the sqlite database engine. It is the ideal database server for both developers who want to convert a single user database solution to a multiuser project and for companies looking for an affordable, easy to use and easy to maintain database management system. cubeSQL runs on Windows, Mac, Linux and it can be embedded into any iOS and Cocoa application.
cubeSQL is incredibly fast, has a small footprint, is highly reliable and it offers some unique features. It can be easily accessed with any JSON client, with PHP, with the native C SDK, with a Windows DLL and with an highly optimized REAL Studio plugin.
Upvotes: 2