Check file attributes, then NTFS permissions.  I've found the same thing
(Delay of about 2 seconds on initial access to the database) when my
Windows application encounters the database in a read-only state.

On Thu, Mar 7, 2013 at 8:28 AM, Alexander Barkov <b...@mnogosearch.org>wrote:

>   Dear SQLite experts,
>
> I'm developing a Web CGI application.
> It opens an sqlite3 database, executes few SQL queries
> and displays the results in HTML format.
>
> The database is quite small (less that 3mb).
> The application fetches a very small part of the data
> using indexes.
>
>
> My problem is that sqlite3_open() for some reasons
> takes about 1.5 seconds on Windows under IIS 8 web server
> when I open the database in readwrite mode.
>
>
> In all other conditions it takes less than 0.01 seconds:
>
>
> 1. It works fine on Linux, both under Apache
> and when executed from command line.
>
> 2. It works fine on Windows under IIS
> if I use sqlite3_open_v2(SQLITE_OPEN_**READONLY)
>
> 3. It works fine on Windows when executed from command line
> even if I open the database in readwrite mode.
>
> 4. But it takes 1.5 seconds under IIS in readwrite mode.
>
>
> I thought that it's probably somehow related to the privileges that the
> IIS service is running with, and possibly sqlite tries to open some log
> files (or similar) in the locations it does not have access to.
> I tried to put the database file into "C:\Windows\Temp",
> and tried to set "SQLITE_EXTERN char *sqlite3_temp_directory"
> to "C:\Windows\Temp", but nothing helped.
>
> Can you please suggest how to improve performance of sqlite3_open?
>
> Thanks.
> ______________________________**_________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to