Re: [sqlite] nVARCHAR as unique index

2008-05-14 Thread Filip Navara
CREATE INDEX BrandKey2 ON Brand(BrandDescription); On Wed, May 14, 2008 at 7:32 AM, Farzana [EMAIL PROTECTED] wrote: Thanks for your reply Igor. When we checked with the provided query we found that the duplicate values are present in the BrandDescription. We are working with the device

Re: [sqlite] nVARCHAR as unique index

2008-05-14 Thread Farzana
The query we used is SELECT * FROM Brand ORDER BY BrandDescription. The Brand table contains more than 30,000 records. The execution time is reasonable when we execute in the system.But it is slower when we execute the same in the device. Regards, Farzana. Igor Tandetnik wrote: Farzana

Re: [sqlite] nVARCHAR as unique index

2008-05-14 Thread Igor Tandetnik
Farzana [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The query we used is SELECT * FROM Brand ORDER BY BrandDescription. The Brand table contains more than 30,000 records. The execution time is reasonable when we execute in the system.But it is slower when we execute the same in

Re: [sqlite] Help!!! sqlite 3.5.8 crash: access violation

2008-05-14 Thread Dennis Cote
[EMAIL PROTECTED] wrote: When I execute sql statement delete from Carimages where OpTime '2008-05-01 00:00:00' in my database, sqlite3 crashed. The Exception Information reported by XP is: Code: 0xc005 Flags:0x Record: 0x Address:

Re: [sqlite] Proposed SQLite C/C++ interface behavior change.

2008-05-14 Thread Ken
I concur with bob's idea to get a list of open statements. But also like the idea the sqlite3_close_v2 interface that give programmers the option. Ken Bob Ebert [EMAIL PROTECTED] wrote: It seems like a programmer error if a statement remains unfinalized when the DB is closed. It would be

[sqlite] Is this Sorting order right?

2008-05-14 Thread Mahalakshmi.m
Igor Tandetnik wrote: I'm not sure I understand. What exactly are you doing differently in these two cases? Can you quote the exact code that fails, in full? #include stdio.h #include sqlite3.h int main()  {   sqlite3* db;   sqlite3_stmt* insert;  unsigned short ArtistName;   sqlite3_open( 

Re: [sqlite] Proposed SQLite C/C++ interface behavior change.

2008-05-14 Thread Robert Simpson
I wrote this behavior into the SQLite.NET provider as well. However, I make a temp copy of the open statements in the db-Vdbe and finalize the copies so that subsequent calls to sqlite3_finalize() on the original pointer will not fail, but be a no op. int ret = sqlite3_close (db); if (ret

Re: [sqlite] Proposed SQLite C/C++ interface behavior change.

2008-05-14 Thread Robert Simpson
Posted too soon ... change sqlite3_closeAndFreeMutex() to just sqlite3_close(); My version of sqlite3_finalize() contains this small addition: if (p-magic == VDBE_MAGIC_DEAD p-db == NULL) { sqlite3_free(p); return SQLITE_OK; } -Original Message- From: [EMAIL PROTECTED]

Re: [sqlite] Is this Sorting order right?

2008-05-14 Thread Igor Tandetnik
Mahalakshmi.m [EMAIL PROTECTED] wrote: unsigned short ArtistName; sqlite3_bind_text16(insert,1,ArtistName,-1,SQLITE_STATIC); Doesn't compile. The third parameter of sqlite3_bind_text16 is a void*, and you are passing unsigned short there. You might have meant ArtistName, except that the

[sqlite] SQLite version 3.5.9

2008-05-14 Thread D. Richard Hipp
SQLite version 3.5.9 is now available on the SQLite website http://www.sqlite.org/ http://www.sqlite.org/download.html This release features some minor bug fixes and performance enhancements. There is also a new *experimental* PRAGMA called journal_mode which can provide

Re: [sqlite] SQLite version 3.5.9

2008-05-14 Thread Petite Abeille
Hello, On May 14, 2008, at 7:17 PM, D. Richard Hipp wrote: There is also a new *experimental* PRAGMA called journal_mode which can provide performance improvements under some circumstances. I'm trying the new journal_mode pragma: % uname -v Darwin Kernel Version 9.2.2;

Re: [sqlite] SQLite version 3.5.9

2008-05-14 Thread D. Richard Hipp
On May 14, 2008, at 1:59 PM, Petite Abeille wrote: Hello, On May 14, 2008, at 7:17 PM, D. Richard Hipp wrote: There is also a new *experimental* PRAGMA called journal_mode which can provide performance improvements under some circumstances. I'm trying the new journal_mode pragma: %

Re: [sqlite] SQLite version 3.5.9

2008-05-14 Thread Petite Abeille
On May 14, 2008, at 8:10 PM, D. Richard Hipp wrote: Works for me. Did you compile the shell yourself or use the prebuilt binary? I did compile it myself. Any additional configuration(s) one should take care of to enable this pragma? ___

Re: [sqlite] SQLite version 3.5.9

2008-05-14 Thread Petite Abeille
On May 14, 2008, at 8:10 PM, D. Richard Hipp wrote: Works for me. Did you compile the shell yourself or use the prebuilt binary? Ooops... never mind... the shell works fine... I was using sqlite3_prepare and my application was linked against a different version of the lib... Everything

Re: [sqlite] SQLite version 3.5.9

2008-05-14 Thread D. Richard Hipp
On May 14, 2008, at 2:14 PM, Petite Abeille wrote: On May 14, 2008, at 8:10 PM, D. Richard Hipp wrote: Works for me. Did you compile the shell yourself or use the prebuilt binary? I did compile it myself. Any additional configuration(s) one should take care of to enable this pragma?

Re: [sqlite] SQLite version 3.5.9

2008-05-14 Thread D. Richard Hipp
On May 14, 2008, at 3:58 PM, Peter K. Stys wrote: I'm curious, when you say performance enhancements, does that include improved R/W performance to/from remote volumes on OS X, which presently suffer serious (20-fold) speed issues. I had a recent post on this. If not, will 3.6.0 address

Re: [sqlite] SQLite version 3.5.9

2008-05-14 Thread Peter K. Stys
On Wed, May 14, 2008 at 2:09 PM, D. Richard Hipp [EMAIL PROTECTED] wrote: On May 14, 2008, at 3:58 PM, Peter K. Stys wrote: I'm curious, when you say performance enhancements, does that include improved R/W performance to/from remote volumes on OS X, which presently suffer serious

Re: [sqlite] SQLite version 3.5.9

2008-05-14 Thread Dennis Cote
Peter K. Stys wrote: I would disagree with this, unless I misunderstand. File copies (from the Finder under OS X) to/from our Xserve run at about 50 MBytes/s or about 50% of theoretical max on our Gbit LAN, whereas reading the records from the same file via SQLite is 20-25x slower (≈2MB/sec

Re: [sqlite] SQLite version 3.5.9

2008-05-14 Thread Brad House
I would disagree with this, unless I misunderstand. File copies (from the Finder under OS X) to/from our Xserve run at about 50 MBytes/s or about 50% of theoretical max on our Gbit LAN, whereas reading the records from the same file via SQLite is 20-25x slower (—2MB/sec at best, terrible

Re: [sqlite] SQLite version 3.5.9

2008-05-14 Thread Brad House
You may see some performance increase by setting pragma page_size to a larger value so that SQLite transfers fewer, but larger, blocks across the network. I would try benchmark tests with page sizes of 8K and 32K to see if there is a substantial difference. Good point Dennis, though you

Re: [sqlite] SQLite version 3.5.9

2008-05-14 Thread Jay A. Kreibich
On Wed, May 14, 2008 at 02:40:28PM -0600, Peter K. Stys scratched on the wall: On Wed, May 14, 2008 at 2:09 PM, D. Richard Hipp [EMAIL PROTECTED] wrote: Performance on a remote volume is about 20x slower because the raw I/O capability of a network disk drive is about about 1/20th of a local

Re: [sqlite] Proposed SQLite C/C++ interface behavior change.

2008-05-14 Thread Samuel Neff
On Tue, May 13, 2008 at 7:51 PM, D. Richard Hipp [EMAIL PROTECTED] wrote: for version 3.6.0 we are considering a behavior change in which a call to sqlite3_close() will silently and automatically call sqlite3_finalize() on all outstanding prepared statements. D. Richard Hipp [EMAIL

Re: [sqlite] SQLite version 3.5.9

2008-05-14 Thread Peter K. Stys
On Wed, May 14, 2008 at 3:40 PM, Jay A. Kreibich [EMAIL PROTECTED] wrote: WORKAROUNDS: Set SQLites page size to be much larger (PRAGMA page_size). Makes SQLite deal with bigger chunks of data, reducing the overhead percentage. You'll very likely need to turn this up pretty high

[sqlite] Confirming locking and transaction characteristics

2008-05-14 Thread David Barrett
Can you please double-check the following to make sure it's accurate? I've read the File Locking and Concurrency page and I'm trying to verify how SQLite works in the following scenario: There is a single table (bar) with a single column (foo) with a single row containing the integer value 1.

Re: [sqlite] Confirming locking and transaction characteristics

2008-05-14 Thread Igor Tandetnik
David Barrett [EMAIL PROTECTED] wrote: There is a single table (bar) with a single column (foo) with a single row containing the integer value 1. Two processes (A and B) have opened the database in READWRITE mode. They both try to atomically increment the value at the same time. What

Re: [sqlite] Confirming locking and transaction characteristics

2008-05-14 Thread David Barrett
Igor Tandetnik wrote: David Barrett [EMAIL PROTECTED] wrote: There is a single table (bar) with a single column (foo) with a single row containing the integer value 1. Two processes (A and B) have opened the database in READWRITE mode. They both try to atomically increment the value at the

Re: [sqlite] Confirming locking and transaction characteristics

2008-05-14 Thread Igor Tandetnik
David Barrett [EMAIL PROTECTED] wrote: Igor Tandetnik wrote: SQLite detects deadlock situation. The call trying to execute the update statement fails immediately with SQLITE_BUSY error. Neither transaction releases its locks: to make progress, one of them has to explicitly roll back. Aha,

[sqlite] SQLite remote management tools?

2008-05-14 Thread Richard Klein
Are there any GUI-based tools that provide management of a remote SQLite database? I'm looking for a workstation-based tool that will allow me to manage a database on an embedded device. Thanks in advance, - Richard Klein ___ sqlite-users mailing list

[sqlite] SQLite3 C API question

2008-05-14 Thread Jon Dixon
I am a Perl programmer, and I am trying to update the DBD::SQLite package to use version 3 rather than version 2 of SQLite (somehow it doesn't seem that anyone else has done this yet). Unfortunately, I am really rusty on my C skills, which are needed to handle the glue between Perl and the

Re: [sqlite] SQLite3 C API question

2008-05-14 Thread Jay A. Kreibich
On Wed, May 14, 2008 at 09:26:53PM -0700, Jon Dixon scratched on the wall: I am a Perl programmer, and I am trying to update the DBD::SQLite package to use version 3 rather than version 2 of SQLite (somehow it doesn't seem that anyone else has done this yet). DBD::SQLite-1.14

Re: [sqlite] Help!!! sqlite 3.5.8 crash: access violation

2008-05-14 Thread qinligeng
I am sorry that I can not provide any sample records of the table because every time I acces the table sqlite will crash. exceute sql: select * from carimages limit 0,1; OK! exceute sql: select * from carimages limit 1,1; OK! exceute sql: select * from carimages limit 2,1; CRASH!! Maybe the