Re: [sqlite] Slow sqlite3_open() - possible culprits?

2013-03-24 Thread Mohit Sindhwani

Hi!

On 15/3/2013 11:40 PM, Mohit Sindhwani wrote:

Hi Richard,

On 14/3/2013 8:17 PM, Richard Hipp wrote:
On Thu, Mar 14, 2013 at 12:34 AM, Mohit Sindhwani  
wrote:


Hi, we are using SQLite3 + CEROD for a number of databases in an 
embedded
systems application running on Windows CE.  We're finding 
unexpectedly long

time to open the database (0.5s ~ 2.8sec).  Maybe, these times are
reasonable, but they seem long to us.



Did you read this thread:

http://www.mail-archive.com/sqlite-users%40sqlite.org/msg75761.html


I did read this thread and I thought that it may not be related since 
we are on Windows CE with FAT, we're using CEROD (so the database is 
implicitly meant for Read Only operations) and we're opening the 
database with SQLITE_READ_ONLY specified in the _open() API.  I'll try 
to check the permissions and attributes again to be sure.


I checked again and the file attributes are not set for "read only".

Any other thoughts on what could be slowing sqlite3_open() on a CEROD 
database?


Best Regards,
Mohit.
25/3/2013 | 12:14 PM.

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


Re: [sqlite] Slow sqlite3_open() - possible culprits?

2013-03-15 Thread Mohit Sindhwani

Hi Richard,

On 14/3/2013 8:17 PM, Richard Hipp wrote:

On Thu, Mar 14, 2013 at 12:34 AM, Mohit Sindhwani  wrote:


Hi, we are using SQLite3 + CEROD for a number of databases in an embedded
systems application running on Windows CE.  We're finding unexpectedly long
time to open the database (0.5s ~ 2.8sec).  Maybe, these times are
reasonable, but they seem long to us.



Did you read this thread:

 http://www.mail-archive.com/sqlite-users%40sqlite.org/msg75761.html


I did read this thread and I thought that it may not be related since we 
are on Windows CE with FAT, we're using CEROD (so the database is 
implicitly meant for Read Only operations) and we're opening the 
database with SQLITE_READ_ONLY specified in the _open() API.  I'll try 
to check the permissions and attributes again to be sure.


Best Regards,
Mohit.


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


Re: [sqlite] Slow sqlite3_open() - possible culprits?

2013-03-14 Thread Richard Hipp
On Thu, Mar 14, 2013 at 12:34 AM, Mohit Sindhwani  wrote:

> Hi, we are using SQLite3 + CEROD for a number of databases in an embedded
> systems application running on Windows CE.  We're finding unexpectedly long
> time to open the database (0.5s ~ 2.8sec).  Maybe, these times are
> reasonable, but they seem long to us.
>


Did you read this thread:

http://www.mail-archive.com/sqlite-users%40sqlite.org/msg75761.html

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Slow sqlite3_open() - possible culprits?

2013-03-14 Thread Mohit Sindhwani

Hi Stephen,

Thanks for the reply!

On 14/3/2013 2:20 PM, Stephen Chrzanowski wrote:

If you're attempting to open a read only SQLite database, it seems as
though it will take that time to validate write permissions.


By "read only", I meant that the database is for reading only.  It 
doesn't have a "read only attribute" set on the file system. Further, 
the open API is called with READ_ONLY specified as a parameter.  I'll 
double check the file attributes on the disk.



I don't know what CEROD is.
CEROD is an SQLite extension from HWACI for "Compressed Encrypted 
Read-Only Database" - it encrypts and compresses the database after 
which it is much smaller and safe from prying eyes, but can only be read 
from, not written to.  Our database is a database of reference 
information, so that works very well for our application.



In that thread, to which I was a part of, you'll notice
that when I changed just the basic file attribute to read only, even the
CLI paused for the 2 second period.  I've NEVER looked at, which inherently
means I've never traced into, SQLites code to validate what I've found.
But with my Delphi SQLite wrapper, and the SQLite CLI, I get the same
delayed results.


Thanks for the details.  I'll double check the file attributes once to 
be sure, but since we're opening it with READ_ONLY flag specified in the 
API, I would expect that the problem may be elsewhere.


Best Regards,
Mohit.


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


Re: [sqlite] Slow sqlite3_open() - possible culprits?

2013-03-14 Thread Stephen Chrzanowski
If you're attempting to open a read only SQLite database, it seems as
though it will take that time to validate write permissions.  I don't know
what CEROD is.  In that thread, to which I was a part of, you'll notice
that when I changed just the basic file attribute to read only, even the
CLI paused for the 2 second period.  I've NEVER looked at, which inherently
means I've never traced into, SQLites code to validate what I've found.
But with my Delphi SQLite wrapper, and the SQLite CLI, I get the same
delayed results.

On Thu, Mar 14, 2013 at 12:34 AM, Mohit Sindhwani  wrote:

> Hi, we are using SQLite3 + CEROD for a number of databases in an embedded
> systems application running on Windows CE.  We're finding unexpectedly long
> time to open the database (0.5s ~ 2.8sec).  Maybe, these times are
> reasonable, but they seem long to us.
>
> We are using:
> sqlite3_open_v2(sFilePath, , SQLITE_OPEN_READONLY, NULL);
>
> What are the kinds of things that would slow down opening the database?
> > Database size?
> > Database schema?
> > CEROD?
>
> If someone in the know can throw some light on this, we can try to see how
> to mitigate the timing.
>
> I know there was a recent thread on sqlite3_open taking 1.5s under IIS and
> that was a permissions issue.  That is not the case for us (since we are
> using a read-only CEROD database)
>
> Thanks & Best Regards,
> Mohit.
>
>
> __**_
> sqlite-users mailing list
> sqlite-users@sqlite.org
> 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


[sqlite] Slow sqlite3_open() - possible culprits?

2013-03-13 Thread Mohit Sindhwani
Hi, we are using SQLite3 + CEROD for a number of databases in an 
embedded systems application running on Windows CE.  We're finding 
unexpectedly long time to open the database (0.5s ~ 2.8sec).  Maybe, 
these times are reasonable, but they seem long to us.


We are using:
sqlite3_open_v2(sFilePath, , SQLITE_OPEN_READONLY, NULL);

What are the kinds of things that would slow down opening the database?
> Database size?
> Database schema?
> CEROD?

If someone in the know can throw some light on this, we can try to see 
how to mitigate the timing.


I know there was a recent thread on sqlite3_open taking 1.5s under IIS 
and that was a permissions issue.  That is not the case for us (since we 
are using a read-only CEROD database)


Thanks & Best Regards,
Mohit.


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