Re: [sqlite] An order by problem, maybe a bug?

2014-09-20 Thread Klaas V
Simon wrote about parts of names like e.g. the Dutch/Flemish 'van' They should definitely not be capitalised Is not always true. Especially in northern Belgium names are often spelled like Van (often even connected with the last name) and I did personally the same to see which of the two

Re: [sqlite] Inefficient query plan with ORDER BY and UNION ALL subquery

2014-09-20 Thread Dan Kennedy
On 09/20/2014 10:59 AM, Yuanzhong Xu wrote: I think this is related to a check for restriction (18) in subquery flattening. (18) If the sub-query is a compound select, then all terms of the ORDER by clause of the parent must be simple references to columns of the sub-query. Quite correct.

Re: [sqlite] Rrepresentation of REAL type - answered!

2014-09-20 Thread TimeOfDay.nl
Adminer sets the precision http://www.php.net/ini.core#ini.precision directive. That's the correct answer. So it is PHP itself thats rounds to 14 decimals, as defined in php.ini. Adminer overrides it. On Sat, Sep 20, 2014 at 4:37 AM, Richard Hipp d...@sqlite.org wrote: On Fri, Sep 19, 2014

Re: [sqlite] How preserve the string metric in an extension.

2014-09-20 Thread Andrea Peri
Hi, I resolve the bug. Thx for explanations. Effectively the proble was that the documentation dont explain very well why is needed to call a sqlite3_value_text. The only obvious explanation is that it is changed, but never say about what is this changed, neither is report what transformation

Re: [sqlite] Inefficient query plan with ORDER BY and UNION ALL subquery

2014-09-20 Thread Yuanzhong Xu
There is a related issue: If you use this valid efficient query , SELECT id,data FROM (SELECT * FROM t1 UNION ALL SELECT * FROM t2) WHERE id=10 ORDER BY data; as a subquery of SELECT id FROM (...), i.e., SELECT id FROM (SELECT id,data FROM (SELECT * FROM t1 UNION ALL SELECT * FROM t2) WHERE

Re: [sqlite] Inefficient query plan with ORDER BY and UNION ALL subquery

2014-09-20 Thread Clemens Ladisch
Yuanzhong Xu wrote: There is a related issue: If you use this valid efficient query as a subquery of SELECT id FROM (...), i.e., SELECT id FROM (SELECT id,data FROM (SELECT * FROM t1 UNION ALL SELECT * FROM t2) WHERE id=10 ORDER BY data); SQLite reports error: Error: 1st ORDER BY term

Re: [sqlite] Inefficient query plan with ORDER BY and UNION ALL subquery

2014-09-20 Thread Richard Hipp
On Sat, Sep 20, 2014 at 12:57 PM, Clemens Ladisch clem...@ladisch.de wrote: Yuanzhong Xu wrote: There is a related issue: If you use this valid efficient query as a subquery of SELECT id FROM (...), i.e., SELECT id FROM (SELECT id,data FROM (SELECT * FROM t1 UNION ALL SELECT * FROM

Re: [sqlite] 50% faster than 3.7.17

2014-09-20 Thread tonyp
In trying to see if the new version breaks any of my queries, I ran several of them repeatedly, and they all appear to have produced the expected output. The only thing I noticed which maybe of interest in relation to speed performance was (with .timer on) that although the first two run time

Re: [sqlite] 50% faster than 3.7.17

2014-09-20 Thread Richard Hipp
On Sat, Sep 20, 2014 at 1:34 PM, to...@acm.org wrote: In trying to see if the new version breaks any of my queries, I ran several of them repeatedly, and they all appear to have produced the expected output. The only thing I noticed which maybe of interest in relation to speed performance

Re: [sqlite] An order by problem, maybe a bug?

2014-09-20 Thread James K. Lowden
On Fri, 19 Sep 2014 11:42:26 -0700 Roger Binns rog...@rogerbinns.com wrote: You do realise there are more people in the US than just those born in the country with good old fashioned roman alphabet 26 ascii letters? Yes. Did I mention ASCII? --jkl

Re: [sqlite] An order by problem, maybe a bug?

2014-09-20 Thread James K. Lowden
On Fri, 19 Sep 2014 17:40:52 +0100 Simon Slavin slav...@bigfraud.org wrote: Problems arising from the schema you suggest: 1. select by last name 2. select by first name 3. duplicate detection[1] 4. however they want is unknown and idiosyncratic 5. whatever order may be more

Re: [sqlite] An order by problem, maybe a bug?

2014-09-20 Thread Simon Slavin
On 20 Sep 2014, at 7:42pm, James K. Lowden jklow...@schemamania.org wrote: I'm saying more than one sort order is often needed. If you don't distinguish among the components of the person's name, you can't sort by those components. I don't understand why anyone would want to sort on

Re: [sqlite] An order by problem, maybe a bug?

2014-09-20 Thread Petite Abeille
On Sep 20, 2014, at 9:21 PM, Simon Slavin slav...@bigfraud.org wrote: Anyone who worked for a big company these days and created such a database should get called in and told to do it again properly. Along these same lines: Your last name contains invalid characters

Re: [sqlite] An order by problem, maybe a bug?

2014-09-20 Thread John Hascall
The problem with your suggestion of 'two uses = two fields' is that no sooner do you do that then somebody comes up with additional uses, for example, formal greeting, informal greeting, the appropriate form for government form X123, and so on John Hascall IT Services Iowa State Univ. On

Re: [sqlite] Performance regression between 3.7.17 and 3.8.0.2?

2014-09-20 Thread Merike
19.09.2014 04:21, Richard Hipp kirjutas: A simple script to reproduce the problem in the latest SQLite is as follows: CREATE TABLE t1(a INTEGER PRIMARY KEY, b INTEGER, c INTEGER, d INTEGER); CREATE INDEX t1b ON t1(b); CREATE TABLE t2(x INTEGER PRIMARY KEY, y); explain query plan SELECT * FROM

Re: [sqlite] Performance regression between 3.7.17 and 3.8.0.2?

2014-09-20 Thread Richard Hipp
On Sat, Sep 20, 2014 at 12:45 PM, Merike gas...@smail.ee wrote: 19.09.2014 04:21, Richard Hipp kirjutas: A simple script to reproduce the problem in the latest SQLite is as follows: CREATE TABLE t1(a INTEGER PRIMARY KEY, b INTEGER, c INTEGER, d INTEGER); CREATE INDEX t1b ON t1(b); CREATE

Re: [sqlite] An order by problem, maybe a bug?

2014-09-20 Thread Simon Slavin
On 20 Sep 2014, at 9:42pm, Petite Abeille petite.abei...@gmail.com wrote: Your last name contains invalid characters http://blog.jgc.org/2010/06/your-last-name-contains-invalid.html Ah yes, John Graham-Cumming. One of those sneaky non-standard-format foreign names. Probably a terrorist.

Re: [sqlite] An order by problem, maybe a bug?

2014-09-20 Thread Mark Halegua
On Friday, September 19, 2014 08:07:06 PM Simon Slavin wrote: No, no he's just working on US Pulp Magazines. All pulp writers have traditional names. He's not going to have any trouble. Except, of course, with Daniel Keys Moran. Who doesn't use his first name except when writing. And

Re: [sqlite] An order by problem, maybe a bug?

2014-09-20 Thread Simon Slavin
On 20 Sep 2014, at 11:09pm, Mark Halegua phanto...@mindspring.com wrote: I'm going to have a separate table for pennames. Lester del Rey will be last name del Rey, first name Lester. My problem will be the following: Therer are a number of writers who used several non de plummes,