[sqlite] sqlite3SelectDump - debug parse tree of a SELECT statement

2006-07-23 Thread Joe Wilson
If anyone is interested, the attached code patch can dump an internal parse tree of an SQLite SELECT statement. Perhaps it may be of use to someone doing SQL statement analysis, transformations or SQL source-level optimizations. An example: sqlite> select * from (select Type, Name from (select

Re[2]: [sqlite] Help me in SQL

2006-07-23 Thread blins
Hi Jay, Friday, July 21, 2006, 7:05:59 PM, you wrote: JS> Can you change the alias to a different field name than the source tables? I try: select t1.field1 as otherfield1, t2.field2 as otherfield2 from table1 t1 left join table2 t2 on (t1.id=t2.refid) and I receive the message on a

RE: [sqlite] Temp dir

2006-07-23 Thread Christian Smith
chtaylo3 uttered: Set the global variable sqlite3_temp_directory to any directory you want and it tries that directory first. Ok, fair enough. But why do you try and open the directory? Why can you just try and create the tmp file there and deal with it if it's not allowed? I'm asking

Re: [sqlite] Autoincrement Reset?

2006-07-23 Thread Adam
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Adam <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I have a table which includes a column "customorder integer primary key > > autoincrement" which I use to address rows in the table. > > > > When I delete a row, I renumber the remaining

Re: [sqlite] Autoincrement Reset?

2006-07-23 Thread drh
Adam <[EMAIL PROTECTED]> wrote: > Hi, > > I have a table which includes a column "customorder integer primary key > autoincrement" which I use to address rows in the table. > > When I delete a row, I renumber the remaining rows so that the key remains > continuous (to match my GUI display).

[sqlite] Autoincrement Reset?

2006-07-23 Thread Adam
Hi, I have a table which includes a column "customorder integer primary key autoincrement" which I use to address rows in the table. When I delete a row, I renumber the remaining rows so that the key remains continuous (to match my GUI display). However, when I subsequently insert a new row, the

Re: [sqlite] Is BETWEEN faster than comparison operators?

2006-07-23 Thread Cory Nelson
It used to be the other way around (between was slower, wouldn't use index), but now one of them is optimized into the other, can't remember which. On 7/23/06, Hartwig Wiesmann <[EMAIL PROTECTED]> wrote: Hello, I have read somewhere that BETWEEN is faster than the equivalent expression using