Re: [sqlite] Cost/viability of using "layered" views as filters?

2013-10-02 Thread Richard Hipp
On Wed, Oct 2, 2013 at 6:47 PM, Stephan Beal wrote: > > a) is this a gross/unconscionable inefficiency or is this a viable > strategy, provided the number of filters stays small (say, 2-3)? > The query optimizer in SQLite will probably flatten the nested views into a

[sqlite] How to use my own python function in a SQLite WHERE clause?

2013-10-02 Thread Bao Niu
I coded a module that has a ChineseDate class, which automatically parse Chinese dates characters into a python-dateutil object(which actually is a datetime.datetime object as well). I used detect_types=sqlite3.PARSE_DECLTYPES to tell the connection object to store this ChineseDate type directly

[sqlite] Cost/viability of using "layered" views as filters?

2013-10-02 Thread Stephan Beal
Hi, all, (My apologies in advance for the length of this post. 90% of it is just setting the stage for a couple relatively simple questions.) As part of the Fossil SCM, earlier this evening i did something kind of strange with sqlite and now i'm looking for feedback on whether or not this is a

Re: [sqlite] Tcl interface: array not created when ...

2013-10-02 Thread Rob Sciuk
To: sqlite-users@sqlite.org Subject: [sqlite] Bug : Tcl interface: array not created when call "db eval {...} ?array-name? ?script?" [ The following text is in the "ISO-8859-1" character set. ] [ Your display is set for the "US-ASCII" character set. ] [ Some characters may be

Re: [sqlite] Hints for the query planner

2013-10-02 Thread Nico Williams
On Wednesday, October 2, 2013, Richard Hipp wrote: > > In the current beta (at http://www.sqlite.org/download.html) the function > is either unlikely(X) or likelihood(X,Y). In the second form, Y must be a > floating point constant between 0.0 and 1.0, inclusive. The first form is > equivalent to

Re: [sqlite] Implementing a new index

2013-10-02 Thread Richard Hipp
On Wed, Oct 2, 2013 at 12:22 AM, Charles Moyes wrote: > > Would you be open to accepting a patch for a new spatial index extension > (namely: M-tree as described in [1])? This may become a new personal > project. > (1) I'll not make that decision without first seeing the

Re: [sqlite] Version 3.8.1 beta

2013-10-02 Thread Ryan Johnson
On 02/10/2013 5:13 AM, Joe Mistachkin wrote: Jan Nijtmans wrote: Well, I did some digging as well, and it looks like the libtool upgrade is the coolpit: See: Classic. The error message is completely inscrutable to someone who's

[sqlite] Implementing a new index

2013-10-02 Thread Charles Moyes
Hi all, Would you be open to accepting a patch for a new spatial index extension (namely: M-tree as described in [1])? This may become a new personal project. Best wishes, Charles [1] Ciaccia, Paolo; Patella, Marco; Zezula, Pavel (1997). "M-tree An Efficient Access Method for Similarity Search

[sqlite] import failing

2013-10-02 Thread Hoover, Jeffrey
I am trying to import a tab delimited file into a table containing 21 columns. It fails on this record Sapurv10037426m 176 RPS-BLAST(BLASTP) cdd gnl|CDD|239293 72 159 1 89 33.756.5174 70.792 cd02995, PDI_a_PDI_a'_C, PDIa family,

[sqlite] Bug : Tcl interface: array not created when call "db eval {...} ?array-name? ?script?"

2013-10-02 Thread Konstantin Kushnir
Hi All! I use sqlite3 ver 3.7.15.1 and simple test: 1. package require sqlite3 2. sqlite3 db :memory: 3. db eval {CREATE TABLE x(a,b)} 4. db eval {INSERT INTO x VALUES(1,2)} 5. #set tempvar "" 6. db eval {SELECT a,b FROM x} tempvar { 7. puts "a = $tempvar(a)" 8. } 9. db close When line 5

Re: [sqlite] Hints for the query planner

2013-10-02 Thread Ryan Johnson
On 02/10/2013 2:19 AM, Baruch Burstein wrote: On Fri, Sep 13, 2013 at 5:29 AM, Ryan Johnson wrote: -- Join cardinality: Bach was a *very* prolific composer whose output likely dwarfs the (surviving) output of his contemporaries select p.title, c.name, p.year from

Re: [sqlite] Hints for the query planner

2013-10-02 Thread Richard Hipp
On Wed, Oct 2, 2013 at 1:40 AM, Nico Williams wrote: > On Tuesday, September 10, 2013, Richard Hipp wrote: > > > SURVEY QUESTION: > > > > The question for today is what to call this magic hint function: > > > > (1) unlikely(EXPR) > > (2) selective(EXPR) > > (3)

Re: [sqlite] Version 3.8.1 beta

2013-10-02 Thread Jan Nijtmans
2013/10/2 Joe Mistachkin : > Thanks a lot for looking into this. Your' welcome. This patch appears to work (but maybe -no-undefined should come in through @LDFLAGS@ or $(LTLINK_EXTRAS)) Regards, Jan Nijtmans Index: Makefile.in

Re: [sqlite] Version 3.8.1 beta

2013-10-02 Thread Joe Mistachkin
Jan Nijtmans wrote: > > Well, I did some digging as well, and it looks like the libtool upgrade > is the coolpit: > > See: > Thanks a lot for looking into this. -- Joe Mistachkin ___

Re: [sqlite] Version 3.8.1 beta

2013-10-02 Thread Jan Nijtmans
2013/10/2 Warren Young : > I imagine I could find it with fossil bisect, but I was hoping that just > mentioning the problem here would cause someone close to the > development effort to smack their heads and say "Ah, it must be >sqlite3_foobie_bletch(), which we just added."

Re: [sqlite] Version 3.8.1 beta

2013-10-02 Thread Warren Young
On Oct 1, 2013, at 7:49 PM, Joe Mistachkin wrote: > Warren Young wrote: >> >> It can't build a shared library (DLL) on Cygwin any more: >> >> ./libtool --mode=link gcc -g -O2 -DSQLITE_OS_WIN=1 -I. -I./src >> -I./ext/rtree -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite

Re: [sqlite] Hints for the query planner

2013-10-02 Thread Baruch Burstein
On Fri, Sep 13, 2013 at 5:29 AM, Ryan Johnson wrote: > -- Join cardinality: Bach was a *very* prolific composer whose output > likely dwarfs the (surviving) output of his contemporaries > select p.title, c.name, p.year from composers c join pieces p on p.c_id = > c.id