Re: [sqlite] Query Planner GROUP BY and HAVING clauses optimization ?

2020-01-15 Thread Jean-Baptiste Gardette
Thank you Keith for the detail explanation. I misunderstood the 2 replies were opposite but this is not the case. Thank you again Jean-bapstiste ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Query Planner GROUP BY and HAVING clauses optimization ?

2020-01-15 Thread Jean-Baptiste Gardette
Just to be sure, is it unsafe to write a non agregate SELECT with GROUP BY and HAVING clauses (without sub-SELECT) for the sole prupose explained before (even if the approache is discutable) ? I understand 2 different answers here : - "No, this kind of query can't be rewritten by the

Re: [sqlite] Query Planner GROUP BY and HAVING clauses optimization ?

2020-01-14 Thread Jean-Baptiste Gardette
Thank you Dominic and Keith for your replies The reason i asked this is that i have a query in wich one condition filtering the recordset involves an UDF and this UDF needs to be processed after all table filters have been applied Illustration : additionnal table : CREATE TABLE t2 ( a TEXT

[sqlite] Query Planner GROUP BY and HAVING clauses optimization ?

2020-01-14 Thread Jean-Baptiste Gardette
Hi, Consider the following exemple : CREATE TABLE t1 ( a TEXT PRIMARY KEY, b INTEGER); SELECT * FROM t1 GROUP BY a HAVING b > 1; Will the GROUP BY clause be supressed and HAVING clause be rewritten in WHERE clause by the optimizer ? Jean-Baptiste

Re: [sqlite] Confused with type mismatch in Tcl interface

2019-02-27 Thread Jean-Baptiste Gardette
Sorry for my late reply. Yes, your proposal would definitively solve our problem. (our Tcl dictionnaries are allways filled with values sharing the same type) PS : on wich OS did you run the test script ? (the different outputs between the two computers gives unconfortable feeling)

Re: [sqlite] Confused with type mismatch in Tcl interface

2019-02-27 Thread Jean-Baptiste Gardette
Le 27/02/2019 à 14:55, Richard Hipp a écrit : On 2/27/19, Richard Hipp wrote: The modified script can be downloaded from https://sqlite.orge/tmp/tcl-sqlite-testcase-20190227125331.txt Typo: "sqlite.org", not "sqlite.orge".

[sqlite] Confused with type mismatch in Tcl interface

2019-02-27 Thread Jean-Baptiste Gardette
Win 7, SQLite 3.24.0, Tcl 8.6.9 We don't know if it is a problem about SQLite or Tcl, apologies if it is the wrong list. Our main concern is the type of a value returned by one UDF dereferencing a tcl dictionnary : the type is changing depending from the context. We observed that a

[sqlite] Database is locked

2016-11-09 Thread Jean-Baptiste Gardette
On Window 7 with tcl/tk 8.6.6 and SQLite 3.13.0 The following tcl script craches : package require sqlite3 sqlite3 db1 dbfile1 db1 eval "SELECT A FROM TableA" { db1 eval "ATTACH DATABASE dbfile2 AS 'dbfile2'" db1 eval