Re: [sqlite] Why are two select statements 2000 times faster than one?

2012-04-15 Thread Steinar Midtskogen
Hello again, Another question about max()/min() optimisation. Is there a way I can implement a virtual table so that max()/min() of a sorted (incrementing) column (which could be an integer primary key in a regular table) gets fast? For example, sqlite> explain query plan select max(unix_time)

Re: [sqlite] Embedded platform, problem upgrading from 3.6.20 to 3.7.11

2012-04-15 Thread David Bakkom
Interesting, I backed off to 3.6.23, and it works properly! I tried 3.7.0 and it did not work. Now to explore what the differences might be ... David Bakkom wrote: > > On an embedded platform, a NetBurner SB700-EX, I have SQLite 3.6.20 > running successfully. I recently upgraded the source to

[sqlite] max size for ":memory:" database?

2012-04-15 Thread niXman
Hello list! Tell me please, what is the maximum size allowed for a ":memory:" database? 64 GB is allowed? Thanks. -- Regards,   niXman ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] [PATCH] clean up sqlite3(1) manual

2012-04-15 Thread Ingo Schwarze
Hi, Marc Espie just imported both the sqlite 3.7.11 library and the sqlite3 command line utility into the OpenBSD base system, so both will likely be an integral part of the upcoming OpenBSD 5.2 release in November 2012. For that reason, i have done minimal cleanup of the sqlite3(1) manual page

Re: [sqlite] max size for ":memory:" database?

2012-04-15 Thread Simon Slavin
On 15 Apr 2012, at 3:48pm, niXman wrote: > Tell me please, what is the maximum size allowed for a ":memory:" database? > 64 GB is allowed? If the question was answered directly, the answer would be here: bit it's not (though see answer

Re: [sqlite] max size for ":memory:" database?

2012-04-15 Thread niXman
2012/4/15 Simon Slavin: > If the question was answered directly, the answer would be here: > > > > bit it's not (though see answer 12).  However, the internal architecture of > SQLite suggests that it's 64-bit clean, thus that the limit will be in the > OS,

Re: [sqlite] Why are two select statements 2000 times faster than one?

2012-04-15 Thread Steinar Midtskogen
[Simon Slavin] > On 15 Apr 2012, at 1:31pm, Steinar Midtskogen wrote: > >> Another question about max()/min() optimisation. Is there a way I can >> implement a virtual table so that max()/min() of a sorted >> (incrementing) column (which could be an integer primary key in

Re: [sqlite] max size for ":memory:" database?

2012-04-15 Thread Udi Karni
I tried with the 32-bit version of sqlite-for-Windows on a Windows 7 Home Premium desktop with 8GB - and the ":memory" database couldn't exceed 2GB. The advice was to get a 64-bit version of sqlite-for-Windows. I asked - but didn't get a definitive answer - so excuse my asking again - where can

Re: [sqlite] Why are two select statements 2000 times faster than one?

2012-04-15 Thread Kit
2012/4/15 Steinar Midtskogen : > So, is there really a way to create an index in a virtual table, or a > way to emulate this? Why? You don't need this. Use index on base tables. > My xRowid function simply returns the value of the "unix_time" column, > but even "select

Re: [sqlite] Why are two select statements 2000 times faster than one?

2012-04-15 Thread Gerry Snyder
At worst you could use another table to keep track of the maximum and minimum, and update it with triggers when something is added to or deleted from the virtual table. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Why are two select statements 2000 times faster than one?

2012-04-15 Thread Steinar Midtskogen
[Kit] > 2012/4/15 Steinar Midtskogen : >> So, is there really a way to create an index in a virtual table, or a >> way to emulate this? > > Why? You don't need this. Use index on base tables. My base tables are indexed. Let's say I want to make a very simple virtual table

Re: [sqlite] Why are two select statements 2000 times faster than one?

2012-04-15 Thread Steinar Midtskogen
[Gerry Snyder] > At worst you could use another table to keep track of the maximum and > minimum, and update it with triggers when something is added to or deleted > from the virtual table. My module knows what the maximum and minimum values are at all times. It also knows that the column is

[sqlite] Curious query plan selection

2012-04-15 Thread George
Compare the following two queries and their query plans: 1) explain query plan select * from snapshotsmarketsrunners where marketsru nnersid in (1); 0|0|0|SEARCH TABLE snapshotsmarketsrunners USING INDEX SnapshotsMarketsRunnersMa rketsRunnersIDSnapshotsID (MarketsRunnersID=?) (~10 rows)

[sqlite] Held transaction: behavior different for Rollback-To and Rollback

2012-04-15 Thread sub sk79
Hi, Using SQLite3.6.22 If a transaction is holding database lock (transaction started using BEGIN IMMEDIATE) and application code, without first calling sqlite3_reset(), tries to 1. Rollback-To: hangs waiting for the lock 2. Rollback: fails with message "database is locked". Is this

[sqlite] globe variable convert to sql

2012-04-15 Thread YAN HONG YE
int iwk is a globe variable,sql command is: update mydb set ml= case iwk>5 and score>80 when 1 then 1 else 0 end; but command run failed,the reason is iwk varible not a sql variable, how can I convert globe variable to sql variable? ___

Re: [sqlite] globe variable convert to sql

2012-04-15 Thread Kevin Benson
On Sun, Apr 15, 2012 at 9:19 PM, YAN HONG YE wrote: > int iwk is a globe variable,sql command is: > > update mydb set ml= case iwk>5 and score>80 when 1 then 1 else 0 end; > > but command run failed,the reason is iwk varible not a sql variable, > how can I convert globe

[sqlite] SQLite TEA version downgrades when loaded.

2012-04-15 Thread Madhur Kashyap
Hello, I had compiled TEA (Tcl Extension) on a standard RHEL5 image with Tcl 8.4 present in it as default. If I load the compiled .so file on a regular tclsh the version shown is % dbcmd version 3.7.10 But if I do the same on a commercial EDA tool which uses Tcl has the user interface, it shows