Re: [sqlite] Database file size

2008-11-28 Thread D. Richard Hipp
ll save you one byte per character in the string data >> storage. >> To enforce UTF-8 string storage, execute "PRAGMA encoding='UTF-8'" as >> the first command when creating the database (before you create and >> tables).

Re: [sqlite] Database file size

2008-11-28 Thread D. Richard Hipp
Download the sqlite3_analyzer.exe utility from the SQLite website (http://www.sqlite.org/download.html ) and run it against your database file. The output will tell you where the disk space is being used. You might want to post the output to this list. D. Richard Hipp [EMAIL PROTECTED

Re: [sqlite] Query Crashing SQLite

2008-11-26 Thread D. Richard Hipp
he 'where' clause, > but > I think it gets fooled by the alias. > This is the same problem as ticket #3508. http://www.sqlite.org/cvstrac/tktview?tn=3508 Ticket number #3508 has already been fixed, but only in CVS HEAD, not in the branch from which 3.6

[sqlite] SQLite version 3.6.6.2

2008-11-26 Thread D . Richard Hipp
caution and recommending that all users of SQLite version 3.6.6 and 3.6.6.1 upgrade to version 3.6.6.2. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite

Re: [sqlite] Rtree coordinate limitations ?

2008-11-26 Thread D. Richard Hipp
Perhaps if you give a concrete example of what is going wrong in your application, someone might be able to suggest a fix. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailm

[sqlite] Break compatibility with linux 2.4 in SQLite 3.6.7?

2008-11-22 Thread D. Richard Hipp
is "no" because I really do want to simplify the SQLite unix drivers by deleting the code that implements the linux thread/posix-lock bug work-around. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlit

Re: [sqlite] Adobe AIR Version Issue(?)

2008-11-22 Thread D. Richard Hipp
public-domain version of SQLite. To determine a version of SQLite you can run: SELECT sqlite_version(); If you upgrade to Leopard you will get SQLite version 3.4.0 native to your OS. (The leopard upgrade is worth doing for many reasons unrelated to SQLite, in my opinion.) Or you

Re: [sqlite] Problems using AUTOINCREMENT row IDs in indexes

2008-11-20 Thread D. Richard Hipp
nRowID>=... AND nRowid<=; SELECT * FROM SIgnals WHERE sUserID='...' AND +nRowid>=... AND +nRowid<=...; D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Problems using AUTOINCREMENT row IDs in indexes

2008-11-20 Thread D. Richard Hipp
> twice, which serves no purpose but does confuse the optimizer. Don't >> do that. >> > Any chance to spare the ID field and get an index on the rowid for a > given table? > I do not understand the question. Please rephrase

Re: [sqlite] Problems using AUTOINCREMENT row IDs in indexes

2008-11-20 Thread D. Richard Hipp
gt; SELECT * FROM Signals WHERE sUserID='[EMAIL PROTECTED]' AND nRowID < >>> 100 >>> ORDER BY nRowID DESC LIMIT 100 >>> >>> Looking at the query plans it appears that the nRowID queries >>> aren't >>> exploiting the fact that nRowID is in the index idxUserID. That >>> index is >>> used, but there is no seek using the nRowID as well as the >>> sUserID. >>> >>> >>> Why should the fact that the nRowID field is INTEGER PRIMARY KEY >>> AUTOINCREMENT prevent it from being used properly in query index >>> selection? How can I get AUTOINCREMENT behaviour as well as good >>> index >>> selection? Is this an SQLite bug? > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Fwd: Trying to find an answer

2008-11-19 Thread D. Richard Hipp
9,'OMP','','7114','G-LOWER','NATURAL_GAS','CCF','Blacksmith > Shop','S end of building next to the outside wall','','','','','',''); > >

Re: [sqlite] Terrible performance for one of our tables

2008-11-19 Thread D. Richard Hipp
ssage- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > ] On Behalf Of D. Richard Hipp > Sent: 19 November 2008 12:05 > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Terrible performance for one of our tables > > > On Nov 19, 2008, at 3:08 AM

Re: [sqlite] Another set of questions

2008-11-19 Thread D. Richard Hipp
gt; > - what is quicker/better? Dropping the temporary table on every time > and > recreate it from scratch? Or just deleting the entries? > I don't know. Have you run an experiment to see for yourself? D. Richard Hipp [EMAIL PROTECTED] ___

Re: [sqlite] Sqlite3 lock issue with NFS and read-only queries

2008-11-19 Thread D. Richard Hipp
On Nov 19, 2008, at 5:07 AM, David Levy wrote: > Is there a way to tell Sqlite to not lock the database when we know > there > are only read-only queries ? > PRAGMA omit_readlock=ON; D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-u

Re: [sqlite] Two questions

2008-11-19 Thread D. Richard Hipp
ust apply for searching? Indices are used for both sorting and searching or both at the same time if applicable. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Terrible performance for one of our tables

2008-11-19 Thread D. Richard Hipp
know how many rows are in a certain table, use insert and delete triggers to maintain the count yourself in a separate table. Then just read out the count from the separate table when you need it, rather than recomputing it by reading all 1.2 million rows of the or

Re: [sqlite] bug? like-search with german umlaut is case-sensitive, should not be

2008-11-14 Thread D. Richard Hipp
html). > So, it should be relatively easy to replace the like() - function in > sqlite (see http://www.sqlite.org/lang_corefunc.html#like and > http://www.sqlite.org/c3ref/create_function.html) > http://www.sqlite.org/cvstrac/fileview?f=sqlite/ext/icu/README.txt&am

Re: [sqlite] testing for "cannot commit transaction - SQL statements in progress"

2008-11-12 Thread D. Richard Hipp
seconds and try the sqlite3_exec again, the works > correctly. (testing in the debugger) > > > > Is there anyway to test for this condition so I handle it properly? The situation you describe does not occur in SQLite version 3.6.5. D. Richard Hipp [EMAIL PROTECTED] _

[sqlite] SQLite version 3.6.5

2008-11-12 Thread D. Richard Hipp
email to me. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Please test check-in [5338] on HPUX, AIX, QNX, BSD, etc...

2008-11-11 Thread D. Richard Hipp
3.6.5 out by about this time tomorrow. We plan to release regardless of whether or not we have test results. But if you find a problem, we will delay the release in order to fix it. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list

Re: [sqlite] Distinguishing between sqlite3_stmts

2008-11-06 Thread D. Richard Hipp
nd then prepared with a > different query programmatically. Is there any sort of unique > identifier in those prepared structures? I'm not sure I understand the question. Is http://www.sqlite.org/c3ref/sql.html what you are asking for?

Re: [sqlite] Bug in "cast" function?

2008-11-06 Thread D. Richard Hipp
On Nov 6, 2008, at 6:16 PM, Griggs, Donald wrote: > Another interesting thing: > http://www.sqlite.org/cvstrac/chngview?cn=5866 D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/c

[sqlite] Engineers from MIO listening?

2008-11-06 Thread D. Richard Hipp
If there is anyone from MIO.com is subscripted to this list (and using a private, non-mio.com domain) I would appreciate it if you would contact me by direct email. Tnx. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite

Re: [sqlite] Sqlite concurrency problem

2008-11-03 Thread D. Richard Hipp
; > > Ocado Limited > > Titan Court > 3 Bishops Square > Hatfield Business Park > Hatfield > Herts > AL10 9NE > Tel: +44 (0) 1707 228000 > Fax: +44 (0) 1707 227999 > www.ocado.com > ___ > sqlite-users mailing list > sql

Re: [sqlite] "SQL logic error or missing database" with multithreaded program

2008-11-03 Thread D. Richard Hipp
circumstances, even if they are using completely separate database connections. My advice is that you not use threads. Threads are evil. But, recognizing that you are unlikely to heed this warning, at the very least compile with SQLITE_THREADSAFE=1 if you really think you must use threa

[sqlite] Bloomberg joins SQLite Consortium

2008-11-01 Thread D. Richard Hipp
enhancement of SQLite. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] "SQL logic error or missing database" with multithreaded program

2008-10-31 Thread D. Richard Hipp
R that you looked up? What error message does sqlite3_errmsg(db) return? D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Windows permissions result in peculiar behavior

2008-10-28 Thread D. Richard Hipp
nd the problem. I have no explanation for the observed behavior. Have you tried running "PRAGMA integrity_check" against the database as a normal user? D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] unexpected database growth

2008-10-27 Thread D. Richard Hipp
.1MB which is not far from the actual database file size of 2.6MB. I think the growth in database size is probably occurring because you are inserting more values into the database than you think you are. The first few pages of the output of sqlite3_analyzer are attached. D. Richard Hipp [EMA

Re: [sqlite] Vacuum needed?

2008-10-27 Thread D. Richard Hipp
e size you might consider > running a VACUUM just *before* deleting the records, to avoid peaks > persisting ... and even then (say) every *other* week. > Just a thought ! > VACUUM also defragments a database file which sometimes helps subsequent operations to run faster. D. Richa

Re: [sqlite] database growing surprising rapidly

2008-10-26 Thread D. Richard Hipp
e with only 100 records so that I can poke around a bit? D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] rtree cast warnings on 64bit OS - strange parameter use

2008-10-25 Thread D. Richard Hipp
by the C > standard. That's the reason for these warnings. Its also a reason > not to > turn off the warnings. > Dan is using the void* to hold a 0 or a 1. So his code will work correctly as long as sizeof(void*)>=1. It would be a strange machine indeed that failed to

Re: [sqlite] Foreign Key Constraints

2008-10-21 Thread D. Richard Hipp
nd the discrepancy here. > Are > recursive triggers required to implement some FK constraints that the > above solution cannot impose? > Does http://www.sqlite.org/cvstrac/fileview?f=sqlite/tool/ genfkey.README answer your questions

Re: [sqlite] CURRENT_DATE Behavior

2008-10-20 Thread D. Richard Hipp
_DATE-Behavior-tp20075044p20075044.html > Sent from the SQLite mailing list archive at Nabble.com. > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users D. Richard Hipp [EMAIL P

Re: [sqlite] basic insert questions...

2008-10-15 Thread D. Richard Hipp
N...COMMIT with the INSERT statements in between, you can do thousands and thousands of fast INSERTs for each relatively slow COMMIT. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Error:"Expression cannot be evaluated" with sqlite3_exec()

2008-10-15 Thread D. Richard Hipp
an avoid the locale problem by using sqlite3_snprintf() instead of sprintf(). sqlite3_snprintf() always uses "." for the radix point regardless of what locale says - for exactly the reason that Igor cites. Also with sqlite3_snprintf() you can use %Q instead of '%s' to

Re: [sqlite] SQLite version 3.6.4

2008-10-15 Thread D. Richard Hipp
E_MUTEX_NOOP yourself. Instead set SQLITE_THREADSAFE=0 and let SQLITE_MUTEX_NOOP be set automatically. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite version 3.6.4

2008-10-15 Thread D . Richard Hipp
On Oct 15, 2008, at 8:11 AM, D. Richard Hipp wrote: > SQLite version 3.6.4 is now available for download on the SQLite > website: > > http://www..sqlite.org/download.html > > SQLite version 3.6.4 is considered a stable release. Upgrading from > version 3.6.3 is opt

[sqlite] SQLite version 3.6.4

2008-10-15 Thread D. Richard Hipp
3.6.4 visit http://www.sqlite.org/3_6_4.html D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Efficient updating of arbitrary columns.

2008-10-14 Thread D. Richard Hipp
e all unbound and thus understood as NULL. I prepared the statement once and reused it to do 1000 inserts. The average time was 26.058 milliseconds. Then I did: UPDATE t1 SET a=$av WHERE rowid=$rid I prepared the statement separately 1000 times. The average time was 55.458 millise

Re: [sqlite] sqlite3_open() problem

2008-10-11 Thread D. Richard Hipp
le the sqlite3 command > shell is > running without problems. The command-line shell uses sqlite3_open() too. So if it works there, I do not understand why it is not working in your program. Have you run your program in a debugger to see exactly where it is crashing?

Re: [sqlite] ATTACH problem

2008-10-10 Thread D. Richard Hipp
se connection that has been closed. The error checking to > detect these things and return SQLITE_MISUSE is probabilistic - it is > not guaranteed to succeed. But when it does, it is helpful in finding > application errors. > > SQLITE_MISUSE returns do not set the error message. So &g

Re: [sqlite] ATTACH problem

2008-10-10 Thread D. Richard Hipp
the error message. So sqlite3_errmsg() will continue to return the previous error, whatever that was. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite version 3.6.4 planned for 2008-10-15

2008-10-09 Thread D. Richard Hipp
me again why you want BNF instead of syntax diagrams? Most people find the syntax diagrams to be much easier to understand. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/ma

Re: [sqlite] assert() in sqlite3_initialize() when SQLITE_DEBUG is defined

2008-10-09 Thread D. Richard Hipp
such as the above that attempt to tell SQLite to use a 32-bit integer where it is expecting to have a 64-bit integer. But such configurations are untested. You will likely encounter bugs. I recommend that you only use SQLite on platforms that have a working 64-bit integer capability.

Re: [sqlite] Why is the VDBE testing for NULL?

2008-10-09 Thread D. Richard Hipp
d at compile-time. But OP_IsNull takes no measurable amount of time, so why clutter up the code base to do so? You will get much better output from EXPLAIN if you first run the shell macro ".explain" D. Richard Hipp [EMAIL PROTECTED] __

[sqlite] SQLite version 3.6.4 planned for 2008-10-15

2008-10-09 Thread D. Richard Hipp
-release announcements on sqlite- users and use only sqlite-dev for such purposes. If you think this revised policy is out of line with the usual practice on other projects, please let me know. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users

Re: [sqlite] Replacement for sqlite3_expired?

2008-10-06 Thread D. Richard Hipp
dn't look at the content before approving it D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Large blobs - slow UPDATEs on non-blob columns

2008-10-05 Thread D. Richard Hipp
s depending on their magnitude. If you change the value of an integer it might change the amount of storage it requires, which then requires rewriting everything that comes afterwards. It is recommended that large BLOBs be stored in a separate table with only an INTEGER PRIMARY KEY.

Re: [sqlite] __declspec(deprecate) error in sqlite3.h and sqlite3.c

2008-10-05 Thread D. Richard Hipp
ify these two files in order to compile using Visual C++ > 2003. This problem was fixed by check-in [5732]. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite syntax diagrams

2008-10-03 Thread D. Richard Hipp
ge. You can substitute "display" if you prefer. Or you can omit it all together if you don't want to look at the GIF immediately after it is produced. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sql

Re: [sqlite] SQLite syntax diagrams

2008-10-03 Thread D. Richard Hipp
installed ImageMagick and Ghostscript on a Mac and the script will run there, but the resulting images look really, really bad. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite syntax diagrams

2008-10-03 Thread D . Richard Hipp
On Oct 3, 2008, at 10:48 AM, D. Richard Hipp wrote: > http://www.sqlite.org/draft/syntaxdiagrams.html > http://www.sqlite.org/draft/syntax.html Bad link. Should have been: http://www.sqlite.org/draft/lang.html > > > Comments, criticism, and error reports are welcomed - part

[sqlite] SQLite syntax diagrams

2008-10-03 Thread D. Richard Hipp
http://www.sqlite.org/draft/syntaxdiagrams.html http://www.sqlite.org/draft/syntax.html Comments, criticism, and error reports are welcomed - particularly if they are received in time to be addressed prior to the release of 3.6.4, currently scheduled for Oct 15. D. Richard Hipp [EMAIL

Re: [sqlite] Typo on website

2008-10-02 Thread D. Richard Hipp
ticket > http://www.sqlite.org/cvstrac/captcha?nxp=/cvstrac/tktnew > The problem has already been fixed. See http://www.sqlite.org/docsrc/vinfo/31aaf2c3f5275e43bf301ace914056203f3fccd3 D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Syntax sanity question...

2008-10-01 Thread D. Richard Hipp
On Oct 1, 2008, at 6:25 PM, Mark Spiegel wrote: > -DSQLITE_OMIT_CONFLICT_CLAUSE=1 This disables REPLACE. Also, just so you will know, sqlite3_prepare16() works by converting the SQL into UTF8 then calling sqlite3_prepare(). D. Richard Hipp [EMAIL PROTEC

Re: [sqlite] Power Loss and database files corruption

2008-10-01 Thread D. Richard Hipp
> Any help would be appreciated > Have you read this document: http://www.sqlite.org/atomiccommit.html D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLITE_CONFIG_SERIALIZED

2008-09-30 Thread D. Richard Hipp
ocks to inside of SQLite so that your application code does not have to mess with them. It does not magically provide you any additional concurrency. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Specifing which index to use. Was: Performance/bug in multikey 'group by' in 3.6.2

2008-09-26 Thread D. Richard Hipp
th remarkably little fuss. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] database disk image is malformed

2008-09-25 Thread D. Richard Hipp
atabase recovery - that is the task of the rollback journal. So the statement journal can be deleted at will without damaging the database. And, in fact, the statement journal is opened with delete-on-close. D. Richard Hipp [EMAIL PROTECTED] ___ sqlit

Re: [sqlite] The old bug strikes back

2008-09-23 Thread D. Richard Hipp
ere in the code. The COPY method in the TCL interface has never been documented, I don't believe. And TCL is a case-sensitive language. So I don't think this is going to be a big issue. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Mac file locking

2008-09-22 Thread D. Richard Hipp
seems to have > fixed my problem. Is there any reason this shouldn't be on > by default? It only works on a Mac. The build fails on other posix platforms. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users

Re: [sqlite] Specifing which index to use. Was: Performance/bug in multikey 'group by' in 3.6.2

2008-09-22 Thread D. Richard Hipp
3_stmt is constructed. It is too late to offer hints after the fact. > I > forget if sqlite_stmt keeps a copy of the sql so I may well be > suggesting the impossible here. The api would reinforce the > non-standard nature of the action while keeping the sql dialect

[sqlite] Specifing which index to use. Was: Performance/bug in multikey 'group by' in 3.6.2

2008-09-22 Thread D. Richard Hipp
error. In other words, the new syntax is a requirement, not a hint. Comments? Objections? D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] SQLite version 3.6.3

2008-09-22 Thread D. Richard Hipp
SQLite version 3.6.3 is now available for download from the website http://www.sqlite.org/download.html Version 3.6.3 fixes several bugs in version 3.6.2, most notably the problem with DISTINCT. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite

Re: [sqlite] Performance/bug in multikey 'group by' in 3.6.2

2008-09-21 Thread D. Richard Hipp
On Sep 21, 2008, at 8:51 AM, Russ Leighton wrote: > I am interested in ... a way > to constraint/control index selection on queries. > What other SQL database engines have this capability and what syntax do they use? D. Richard Hipp [EMAIL

Re: [sqlite] Performance/bug in multikey 'group by' in 3.6.2

2008-09-19 Thread D. Richard Hipp
is is just > the way it is? Yes, I know I have > a 3 column index and only using 2 for this query. I do not see how it is possible for what you say to be true - unless you have omitted important details of your query, such as a WHERE clause. What is the argument to sum(), btw? You shou

Re: [sqlite] Looong sql queries (>9 seconds)

2008-09-18 Thread D. Richard Hipp
I can do to get that time down substantially? Try this and see if it helps: CREATE INDEX idx1 ON settings(rate, year, month); D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] best language match for SQLite?

2008-09-16 Thread D . Richard Hipp
t suite. The language bindings for TCL are the most natural and easy-to- use of any language I have seen. The statistics in the quote above are dated. Recently we have been getting about 11,000 unique IPs per day at the website and the amount of

Re: [sqlite] Backticks in Column Names

2008-09-11 Thread D. Richard Hipp
ging them without a very good reason.) D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Considerations with in-memory SQLite3

2008-09-10 Thread D. Richard Hipp
to be serialized. If you create a TEMP table to hold the 3000 selected records then do: INSERT INTO temptab SELECT * FROM maintab WHERE ...; You can then do your computations on the temporary table without even interfering with writers on the main table. D. Richard Hipp [EMAIL PROTECTED]

Re: [sqlite] Memory suggestion for DRH

2008-09-10 Thread D. Richard Hipp
the disk cache behavior in the VFS layer. SQLite passes sufficient flag information into the "open" method of the VFS to let it know when the file can be a memory cache versus a real file. D. Richard Hipp [EMAIL PROTECTED] ___ s

Re: [sqlite] valgrind leak summary shows possible memory loss

2008-09-10 Thread D. Richard Hipp
e some thread-local storage. This is pthreads thing. There is nothing SQLite can do about it. If you are concerned, compile with - DSQLITE_THREADSAFE=0. This is not a bug in SQLite. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list s

Re: [sqlite] memsys3 vs memsys5

2008-09-09 Thread D. Richard Hipp
> Is there any > reliable method to determine the minimum page-cache allocation size > needed for a given page_size? > sqlite3_status(SQLITE_STATUS_PAGECACHE_SIZE, ...) D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Help Using RowID

2008-09-06 Thread D. Richard Hipp
itself won't, > so id will _still_ be a valid integer primary key, even if the > implementation detail of rowid changes. I promise that INTEGER PRIMARY KEY will always be an alias for the rowid in SQLite. This will not change. > D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Get declared Datatype of SQLite Virtual Table

2008-09-05 Thread D. Richard Hipp
But there is no place to specify the return datatype. Indeed, many aggregate functions (ex: max()) return different datatypes depending on the datatypes of their inputs. In your example, the sum() function might return either real or integer - it returns integer if all arguments are in

Re: [sqlite] On UNIQUE and PRIMARY KEY

2008-09-05 Thread D. Richard Hipp
that I've finally been straightened out on that point. Sorry for the false alarm D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] On UNIQUE and PRIMARY KEY

2008-09-04 Thread D. Richard Hipp
On Sep 4, 2008, at 8:56 PM, Darren Duncan wrote: > D. Richard Hipp wrote: >> One occasionally sees SQLite schemas of the following form: >> >> CREATE TABLE meta(id LONGVARCHAR UNIQUE PRIMARY KEY, ); >> >> In other words, one sometimes finds a PRIMARY K

[sqlite] On UNIQUE and PRIMARY KEY

2008-09-04 Thread D. Richard Hipp
column in SQLite. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] SQLite version 3.6.2

2008-08-30 Thread D. Richard Hipp
the code and make it more maintainable and reliable moving forward. Nearly 5000 non-comment lines of core code (about 11.3%) have changed from the previous release. Nevertheless, there should be no application-visible changes, other than bug fixes. D. Richard Hipp [EMAIL PROTECTED

Re: [sqlite] problem using random() in queries

2008-08-28 Thread D. Richard Hipp
and again in the SELECT clause. This looks like a bug. > OK. Even though this kind of thing is probably an abuse of SQL, I'm working on ticket #3343. Just for the record, I'd like everybody to know that the following is really, really hard to do correctly and is going to r

Re: [sqlite] Broken indexes ...

2008-08-28 Thread D. Richard Hipp
ay, but I'm still > left with the last three. > > Am I just out of luck? > Run this command: sqlite3 old.db .dump | sqlite3 new.db D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Manifest Typing performance impact?

2008-08-28 Thread D. Richard Hipp
be trading perhaps 250KB of code space for a heap space savings of less than 1KB. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Manifest Typing performance impact?

2008-08-27 Thread D. Richard Hipp
would slow down performance due to the added cost of checking type constraints at each step. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Index memory usage in SQLite

2008-08-27 Thread D. Richard Hipp
abase causes the freed disk space to go onto a freelist to be used on the next INSERT. The space is not returned to the OS and the file size is not reduced. To reduce the database file size run VACUUM or enable auto_vacuum. D. Richard Hipp [EMAIL PROTECTED] __

Re: [sqlite] sqlite and åäö characters in file n ames

2008-08-22 Thread D. Richard Hipp
re passing strings into windows APIs. Thus the older SQLite bugs and the bugs in your code cancelled each other out. When the bug in SQLite was fixed, the cancellation went away and the bug was expressed. D. Richard Hipp [EMAIL PROTECTED] ___ sq

[sqlite] Details of error messages. Was: "unable to open database file" on DROP

2008-08-22 Thread D. Richard Hipp
On Aug 13, 2008, at 10:59 AM, Dennis Cote wrote: > D. Richard Hipp wrote: >> >> (2) Formal and detail requirements that define precisely what SQLite >> does. >> >> http://www.sqlite.org/draft/tokenreq.html >> http://www.sqlite.org/draft/syntax.ht

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-21 Thread D. Richard Hipp
(~2MB) http://www.fossil-scm.org/index.html (~6MB) D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread D. Richard Hipp
s been fixed since 3.6.1 that causes it to use less memory. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread D. Richard Hipp
'm seeing the in-memory database use about 15% more space than the on-disk database. I'm not sure what you are doing to get 3x memory usage. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread D. Richard Hipp
On Aug 20, 2008, at 2:22 PM, Brown, Daniel wrote: > sqlite3_memory_highwater() ~ 25673060 > sqlite3_memory_used() ~ 23222709 > OK. I'll have a look.... D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@s

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread D. Richard Hipp
ge by the application. It is not at all clear to me that SQLite was using all 28 MB. What does sqlite3_memory_highwater() tell you? D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bi

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread D. Richard Hipp
28MB figure? The sqlite3_analyzer output you posted tells me that the total database size is a little over 9MB, not 28MB. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mail

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-19 Thread D. Richard Hipp
e SQLite website) over that file and post the results. The sqlite3_analyzer utility will give us additional information that might suggest ways of reducing the size of the database file. See also http://www.hwaci.com/sw/sqlite/prosupport.html#compress D. Richa

[sqlite] Correct SQL name resolution on AS clauses in a SELECT?

2008-08-19 Thread D. Richard Hipp
a AS b, b AS a WHERE a=2; SELECT a AS x, b AS x WHERE x=1; D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] "Database is Locked"

2008-08-19 Thread D. Richard Hipp
On Aug 19, 2008, at 11:14 AM, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote: > Are there > any problems with creating the database with 3.5.7 and then reading > it with 3.6.1? There are not suppose to be any difference. Nobody else has reported differences. D

Re: [sqlite] "Database is Locked"

2008-08-19 Thread D. Richard Hipp
> execute a simple PRAGMA > statement. If anyone knows of a solution to this problem I would > appreciate the help. > What else have you changed other than 3.5.7 -> 3.6.1? If you pull out 3.6.1 and recompile with 3.5.7 again does the problem go away? I do not recall making any

Re: [sqlite] vfs implementation question

2008-08-19 Thread D. Richard Hipp
On Aug 19, 2008, at 9:37 AM, Jeffrey Becker wrote: > So in the cases where the lock cant be acquired, the built in vfs > implementations return SQLITE_BUSY? > Yes D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sql

Re: [sqlite] vfs implementation question

2008-08-19 Thread D. Richard Hipp
ny reason why that wouldn't work. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Using SQLite as an application file format (C++)

2008-08-18 Thread D. Richard Hipp
ould be the combination of the OS disk cache and SQLite's internal page cache will make actual disk I/O relatively rare, even for an on-disk database. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.

<    1   2   3   4   5   6   7   8   9   10   >