Re: [sqlite] sqlite backup from the program.

2006-11-03 Thread Lloyd K. L
SQLite database is stored as a normal file in the disk. Why dont you use Operating System calls to back up the file? - Original Message - From: [EMAIL PROTECTED] To: sqlite-users@sqlite.org Sent: Friday, November 03, 2006 2:18 PM Subject: [sqlite] sqlite backup from the program. Hi

Re: [sqlite] sqlite backup from the program.

2006-11-03 Thread Lloyd K. L
Whether your database creation error solved? what was the problem? - Original Message - From: [EMAIL PROTECTED] To: sqlite-users@sqlite.org Sent: Friday, November 03, 2006 2:18 PM Subject: [sqlite] sqlite backup from the program. Hi All, How to take a backup of the sqlite

RE: [sqlite] sqlite backup from the program.

2006-11-03 Thread ravi.karatagi
No, We are working on RTOS. There is some problem with mounting the file system. Therefore all the filesystem APIs are returning failure.The open() system call used inside the sqlite3_open() was not able to create the file. We are trying to find out a solution for it. In the mean time if

[sqlite] Using BLOBs in where fields

2006-11-03 Thread Gabriel Cook
Hello all, I'm trying to figure out if there is a way use portions of a BLOB field in a select query. Here is an example of the table: CREATE TABLE fcdata ( timestamp INTEGER NOT NULL, portINTEGER NOT NULL, dataelementtype

Re: [sqlite] sqlite backup from the program.

2006-11-03 Thread John Stanton
As was pointed out, an Sqlite DB is just va file. Copy it to make a backup. If you cannot create a file from your O/S then you will never be able to make a backup. Fix that problem first. [EMAIL PROTECTED] wrote: No, We are working on RTOS. There is some problem with mounting the

Re: [sqlite] Using BLOBs in where fields

2006-11-03 Thread Isaac Raway
If you can get this to work it will be very slow. I suggest when writing to this table that you extract the relevant parts of the data blob and store them in separate fields with an appropriate index on each each . This will avoid the a table scan for every query, which is what you'd get if your

Re: [sqlite] sqlite backup from the program.

2006-11-03 Thread Will Leshner
On 11/3/06, John Stanton [EMAIL PROTECTED] wrote: As was pointed out, an Sqlite DB is just va file. Copy it to make a backup. If you cannot create a file from your O/S then you will never be able to make a backup. Fix that problem first. There is, however, one issue to be aware of. If you

Re: [sqlite] Query Execution speed.

2006-11-03 Thread Christian Smith
Manzoor Ilahi Tamimy uttered: I found that Version 2.8 was much Faster than 3.6 using :memory:, 30 Seconds and 60 seconds in case of 2.8 and 3.6 respectively. can I use 2.8 in my project when i have a huge amount of data to handle. Version 2 used a Red/Black balanced tree in :memory:,

Re: [sqlite] Query Execution speed.

2006-11-03 Thread drh
Christian Smith [EMAIL PROTECTED] wrote: Version 2 used a Red/Black balanced tree in :memory:, whereas version 3 appears to have done away with this optimisation. I'm curious as to why? It is simpler to support a single algorithm (b-trees) rather than two (b-tree + red/black trees).

RE: [sqlite] Another question on single-thread intent

2006-11-03 Thread David Gewirtz
John Stanton wrote: Perhaps a thread per open database sync'd on an event and driven by a queue would give you contention-free operation and avoid the need to ever have the DB locked. A thread would post its request to the queue then wait on an event signifying completion. That's a

RE: [sqlite] Using BLOBs in where fields

2006-11-03 Thread Gabriel Cook
Thanks for your reply. However, I can't normalize the data in the blob, basically, its an arbitrary frame of data. I don't know what's in it or how its formatted at design time. I'm ok with the table scan, IF I there is any way I can get the query to work. I'll have to scan the data even if I

Re: [sqlite] serious performance problems with indexes

2006-11-03 Thread Christian Smith
Peter De Rijk uttered: --On Friday 27 October 2006 15:31, [EMAIL PROTECTED] wrote: When a table is indexed, INSERT performance is logorithmic in the number of rows in the table and linear in the number of indices. This is because entries have to be inserted into the index in sorted

Re: [sqlite] Using BLOBs in where fields

2006-11-03 Thread Nicolas Williams
On Fri, Nov 03, 2006 at 11:39:47AM -0600, Gabriel Cook wrote: So, is there any way to of thing with a BLOB? WHERE substr(data, 1, 1) == x'bc' This works: WHERE substr(data, 1, 1) == CAST(X'...' AS TEXT); but only as long as X'...' has no NULs. And probably only as lon as data contains no

Re: [sqlite] Another question on single-thread intent

2006-11-03 Thread John Stanton
David Gewirtz wrote: John Stanton wrote: Perhaps a thread per open database sync'd on an event and driven by a queue would give you contention-free operation and avoid the need to ever have the DB locked. A thread would post its request to the queue then wait on an event signifying

[sqlite] Enforcing SQLite column type

2006-11-03 Thread Me
You can enforce a column's TYPE using CHECK() and/or TRIGGER. It might be expensive if used on all columns for large inserts or updates; depends on what the priorities are. INTEGER, REAL and BLOB are easy to enforce with triggers. typeof( NEW.cEnforceReal ) 'real' typeof( NEW.cEnforceInteger )

[sqlite] Novice Question about SQLite Insert Command

2006-11-03 Thread viking2
I have a database (*.db3) with 3 tables: CREATE TABLE TB_Signature (Filename TEXT, FileSignature TEXT, FileSize INTEGER, FileDate INTEGER, PRIMARY KEY (FileSignature,FileSize)); CREATE TABLE TB_FileRecords (pszFilename TEXT PRIMARY KEY, nFileSize INTEGER, nFileSignature TEXT); CREATE TABLE

[sqlite] Re: Novice Question about SQLite Insert Command

2006-11-03 Thread Igor Tandetnik
viking2 [EMAIL PROTECTED] wrote: I have a database (*.db3) with 3 tables: CREATE TABLE TB_Signature (Filename TEXT, FileSignature TEXT, FileSize INTEGER, FileDate INTEGER, PRIMARY KEY (FileSignature,FileSize)); CREATE TABLE TB_FileRecords (pszFilename TEXT PRIMARY KEY, nFileSize INTEGER,

Re: [sqlite] Can primary key columns be altered to use autoincrement?

2006-11-03 Thread Jay Sprenkle
On 11/2/06, Rob Richardson [EMAIL PROTECTED] wrote: I have a small database in which tables have columns that were created as integer primary key, but not autoincrement. I would like to make sure keys are never reused, so I want to add autoincrement to the column definition. Is that possible?