Hello Rinat, I found that if I opened the DB and read it using normal file IO, throwing away the data I read, then closing it and opening it with Sqlite could reduce this initial delay. It depends on the size of the DB though. It's mostly useful for small DB's.
C Wednesday, May 28, 2014, 3:22:49 AM, you wrote: HR> Hi, HR> I work in READ ONLY mode. HR> My application connects the DB only once, at the beginning. HR> I can't really work with local files. (I log to any machine and get my files from the network.) HR> Perhaps there are some intermediate files generated in the first HR> load that I can prepare in advance? HR> Rinat HR> -----Original Message----- HR> From: sqlite-users-boun...@sqlite.org HR> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Stephen Chrzanowski HR> Sent: Thursday, May 22, 2014 4:05 PM HR> To: General Discussion of SQLite Database HR> Subject: Re: [sqlite] Load time performance HR> You shouldn't access a SQLite database remotely, except maybe for HR> read only access, but that could come under fire. Any network HR> file action can't guarantee that write locks happen. HR> If you attempt to access a file in READ-ONLY mode, you'll be greeted with a HR> 1-5 second delay (I don't remember what the delay is right now) HR> per connection. If you're using one connection to the DB, then HR> you'll experience the delay. If you've got one connection going HR> for the life of your application, you'll get hit with the first HR> delay, but all subsequent queries will work. HR> On Thu, May 22, 2014 at 8:12 AM, Hadashi, Rinat <rinat.hada...@intel.com>wrote: >> Hi >> >> The first time I access a database takes significantly more time than >> subsequent accesses. >> I am looking for ideas to shorten the time required for the first access. >> >> I work on Linux, my db. file is "somewhere" in the file system, not >> locally on the machine from which I am running sqlite3 >> >> Thanks >> >> Rinat Hadashi >> >> HR> --------------------------------------------------------------------- HR> Intel Israel (74) Limited HR> This e-mail and any attachments may contain confidential material for HR> the sole use of the intended recipient(s). Any review or distribution HR> by others is strictly prohibited. If you are not the intended HR> recipient, please contact the sender and delete all copies. HR> _______________________________________________ HR> sqlite-users mailing list HR> sqlite-users@sqlite.org HR> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- Best regards, Teg mailto:t...@djii.com _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users