Re: [sqlite] Anyone able to access a SQLite database within aTclstarpack?

2010-02-19 Thread Matthew Smith
Thanks Alexey. As I said earlier, though, this package allows you to put a VFS inside an SQLite database, not the other way around. I'd like to be able to access an SQLite database from within a TCL VFS. It seems, however, it is not possible today. I even tried restoring from a database file

Re: [sqlite] Database is locked error

2010-02-19 Thread Pavel Ivanov
Apparently the following happens: 13875           Thread2 SAVEPOINT Thread2                       success (shared lock acquired) 13875           Thread1 SAVEPOINT Thread1                       success (shared lock acquired) 13880           Thread2 INSERT INTO TableB              success (reserved

[sqlite] Database is locked error

2010-02-19 Thread Trainor, Chris
I am running into a "database is locked" error and I don't quite understand what is going on. If someone could explain what is happening, I'd appreciate it. (I am using sqlite version 3.6.17 on Windows XP.) A busy handler callback has been set up with sqlite3_busy_handler(). In addition to some

Re: [sqlite] Interrupt first sqlite3_step in FTS3 query

2010-02-19 Thread a1rex
Simon, I am very surprise that your SQLite operation can take so long. Is it a very complicated search? Multiple writes? >I have a text field that launches a full text search query at every key press. Can you rearrange your algorithm? How many records do you search? Do you have to search on

Re: [sqlite] Interrupt first sqlite3_step in FTS3 query

2010-02-19 Thread Simon
> According to http://www.sqlite.org/c3ref/interrupt.html > process but will not be aborted if it is quite advanced: > > “If an SQL operation is very nearly finished at the time > when sqlite3_interrupt() is called, then it might not have an opportunity to > be > interrupted and might continue

Re: [sqlite] Interrupt first sqlite3_step in FTS3 query

2010-02-19 Thread a1rex
- Original Message From: Simon dbern...@noos.fr >However, it seems that some process (that can take >several tens of seconds) in the first >sqlite3_step does not test for >interrupt (resulting in simultaneous uninterrupted >concurrent threads...) According to

Re: [sqlite] One data base versus two smaller ones

2010-02-19 Thread a1rex
Thank you for putting me on the right track! Now I know how to attack the issue. Also this pragmas may help me: PRAGMA default_cache_size = Number-of-pages; PRAGMA cache_size = Number-of-pages; PRAGMA page_size = bytes; PRAGMA max_page_count = N; Regards, Samuel - Original Message

Re: [sqlite] One data base versus two smaller ones

2010-02-19 Thread Jay A. Kreibich
On Fri, Feb 19, 2010 at 07:57:15AM -0800, a1rex scratched on the wall: > Thank you very much for your help! > > Since my typical record is less than 100 bytes I guess that I can use > Page Size = 512 bytes without degradation of database performance. Leaf pages hold more than one record. I

Re: [sqlite] One data base versus two smaller ones

2010-02-19 Thread Israel Lins Albuquerque
In the file 'sqliteLimit.h' has constants that can changed at compiler time but the defaults SQLITE_DEFAULT_PAGE_SIZE = 1024 SQLITE_DEFAULT_CACHE_SIZE 2000 this info is used to create the database when the database already created the size used is in the database header. The size of cache

Re: [sqlite] One data base versus two smaller ones

2010-02-19 Thread a1rex
Thank you very much for your help! Since my typical record is less than 100 bytes I guess that I can use Page Size = 512 bytes without degradation of database performance.This would conserve memory. How vital is default number of pages for database performance? Can I drastically drop the

Re: [sqlite] Memory usage ??? one data base versus two smaller ones

2010-02-19 Thread Jay A. Kreibich
On Fri, Feb 19, 2010 at 09:39:08AM -0300, Israel Lins Albuquerque scratched on the wall: > Samuel, > > Each one attached database has its own page cache with 2000 > (default number of pages in cache) * 1024 (default size in > bytes of a page), On many Windows systems it will default to

Re: [sqlite] File locking to harsh?

2010-02-19 Thread Ian Jackson
Dan Kennedy writes ("Re: [sqlite] File locking to harsh?"): > According to the linux man page, both EAGAIN and EACCES mean the lock > could not be obtained due to locks held by other processes. It may mean > other things too, but it's not clear from the man page how those cases > can be

[sqlite] One column in two fk constraints?

2010-02-19 Thread Jan
Hi, I just wanted to ask the sql experts here if the design I am thinking about is ok. Especially this table looks strange but at least its working. I am using the same column (t_x_u_id) in two fk constraints. Although it is doing what I intended I have never seen this and wasn't even sure

Re: [sqlite] File locking to harsh?

2010-02-19 Thread Dan Kennedy
On Feb 18, 2010, at 11:44 PM, Ian Jackson wrote: > Marian Aldenhoevel writes ("[sqlite] File locking to harsh?"): >> ~ # sqlite3 /test "create table A (B integer);" >> Error: database is locked >> >> An strace of that command is attached. The problem surfaces here, I >> think: >> >>

Re: [sqlite] Memory usage – one data base versus tw o smaller ones

2010-02-19 Thread Israel Lins Albuquerque
Samuel, Each one attached database has its own page cache with 2000 (default number of pages in cache) * 1024 (default size in bytes of a page), totaling 2 Mb of ram. But you can define the number of pages in cache. I work using 5 attached databases this needs 10Mb, but some devices (PalmOS)

Re: [sqlite] column type

2010-02-19 Thread Igor Tandetnik
Fan, Allan wrote: > In 3.6.22, > > CREATE TABLE i1 AS SELECT 0 AS value; > > CREATE TABLE i2(value integer); > INSERT INTO i2 VALUES(0); > > CREATE TABLE s AS SELECT '0' AS value; > > SELECT typeof (value) FROM i1; > > select (select value from i1) = (select value from s); > > SELECT typeof

[sqlite] column type

2010-02-19 Thread Fan, Allan
In 3.6.22, CREATE TABLE i1 AS SELECT 0 AS value; CREATE TABLE i2(value integer); INSERT INTO i2 VALUES(0); CREATE TABLE s AS SELECT '0' AS value; SELECT typeof (value) FROM i1; select (select value from i1) = (select value from s); SELECT typeof (value) FROM i2; select (select value from

[sqlite] Interrupt first sqlite3_step in FTS3 query

2010-02-19 Thread Simon
I am using sqlite3 with an FTS3 index for a software running on an iPod Touch. I have a text field that launches a full text search query at every key press. There is a huge speed difference between these devices and what I got accustomed to on desktop computers... To mitigate that, I use an

[sqlite] How to use r-trees with single points (if at all possible)

2010-02-19 Thread thomas
I have a table with approximately 6.13 million entries, though I plan to extend it to nearly 100 million in the near future. Each entry has three (important) properties: ID, latitude and longitude. ID is a 64 bit integer and latitude and longitude are 64-bit floats, though 32-bit floats would

[sqlite] Sqlite 2.1 -> 3 migration

2010-02-19 Thread Andreas Weller
Hi. Unfortunately my Webhosting provider ceased sqlite 2 support. I downloaded the database file using FTP and tried to dump it on a debian PC with sqlite 2.8.17 This resulted in the following error message: > andr...@notebook:~/db$ sqlite ./database.db ".dump" > Unable to open database