Re: [sqlite] Query optimizer bug?

2013-05-01 Thread James K. Lowden
On Wed, 1 May 2013 07:02:38 -0400 Richard Hipp wrote: > On Wed, May 1, 2013 at 12:42 AM, James K. Lowden > wrote: > > > On Tue, 30 Apr 2013 12:59:17 -0400 > > Richard Hipp wrote: > > > > > http://www.sqlite.org/draft/queryplanner-ng.html > > > > Feel free to use this version of the diagram. > >

Re: [sqlite] Query optimizer bug?

2013-05-01 Thread Richard Hipp
On Wed, May 1, 2013 at 12:42 AM, James K. Lowden wrote: > On Tue, 30 Apr 2013 12:59:17 -0400 > Richard Hipp wrote: > > > http://www.sqlite.org/draft/queryplanner-ng.html > > Feel free to use this version of the diagram. > > http://www.sqlite.org/draft/queryplanner-ng.html > Did you inten

Re: [sqlite] Query optimizer bug?

2013-04-30 Thread Kevin Benson
> > On Tue, 30 Apr 2013 12:59:17 -0400 > Richard Hipp wrote: > > > http://www.sqlite.org/draft/queryplanner-ng.html > > Just a "heads-up" that the paragraph has a couple of accidental transpositions: *IS* "TCP-H Q8" is a test query from the Transaction Processing Performance Council

Re: [sqlite] Query optimizer bug?

2013-04-30 Thread James K. Lowden
On Tue, 30 Apr 2013 12:59:17 -0400 Richard Hipp wrote: > http://www.sqlite.org/draft/queryplanner-ng.html Feel free to use this version of the diagram. http://www.sqlite.org/draft/queryplanner-ng.html The directory contains the source file and PDF, too. Commands are: $ gr

Re: [sqlite] Query optimizer bug?

2013-04-30 Thread Richard Hipp
-y-z? >> >> Maybe I'm over simplifying? >> >> Marc >> >> -Original Message----- >> From: sqlite-users-boun...@sqlite.org [mailto: >> sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik >> Sent: Tuesday, April 30, 2013 5:34 PM >

Re: [sqlite] Query optimizer bug?

2013-04-30 Thread Marc L. Allen
esday, April 30, 2013 6:20 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Query optimizer bug? On Tue, Apr 30, 2013 at 5:46 PM, Marc L. Allen wrote: > In looking at the draft plan... am I right in assuming that at any 'stop' > you can eliminate paths wh

Re: [sqlite] Query optimizer bug?

2013-04-30 Thread Marc L. Allen
PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Query optimizer bug? On Tue, Apr 30, 2013 at 5:46 PM, Marc L. Allen wrote: > In looking at the draft plan... am I right in assuming that at any 'stop' > you can eliminate paths which have consumed the identical set

Re: [sqlite] Query optimizer bug?

2013-04-30 Thread Richard Hipp
is used? > Won't any path R-N2-x-y-z.. be identical to N2-R-x-y-z? > > Maybe I'm over simplifying? > > Marc > > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto: > sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik >

Re: [sqlite] Query optimizer bug?

2013-04-30 Thread Marc L. Allen
ite-users@sqlite.org Subject: Re: [sqlite] Query optimizer bug? On 4/30/2013 5:26 PM, Ryan Johnson wrote: > Being able to force certain access methods (use *this* index, not that > one) would be helpful, though (does "+" do that or just suggest it?). Unary plus turns a simple column

Re: [sqlite] Query optimizer bug?

2013-04-30 Thread Igor Tandetnik
On 4/30/2013 5:26 PM, Ryan Johnson wrote: Being able to force certain access methods (use *this* index, not that one) would be helpful, though (does "+" do that or just suggest it?). Unary plus turns a simple column reference (for which an index can be used) into an expression (which cannot b

Re: [sqlite] Query optimizer bug?

2013-04-30 Thread Ryan Johnson
On 30/04/2013 5:20 PM, Nico Williams wrote: On Tue, Apr 30, 2013 at 11:59 AM, Richard Hipp wrote: http://www.sqlite.org/draft/queryplanner-ng.html That's quite interesting. Should the user have a way to influence the query planner? Perhaps by indicating a cost for each table source? SQL is

Re: [sqlite] Query optimizer bug?

2013-04-30 Thread Nico Williams
On Tue, Apr 30, 2013 at 11:59 AM, Richard Hipp wrote: > http://www.sqlite.org/draft/queryplanner-ng.html That's quite interesting. Should the user have a way to influence the query planner? Perhaps by indicating a cost for each table source? SQL is supposed to let the RDBMS pick the best query

Re: [sqlite] Query optimizer bug?

2013-04-30 Thread Richard Hipp
On Tue, Apr 30, 2013 at 4:35 PM, Ryan Johnson wrote: > On 30/04/2013 12:59 PM, Richard Hipp wrote: > >> On Thu, Mar 14, 2013 at 2:07 PM, Ryan Johnson >> **wrote: >> >> Hi all, >>> >>> I'm running sqlite-3.7.13 on cygwin. Playing around with various TPC-H >>> queries with my class recently, I hit

Re: [sqlite] Query optimizer bug?

2013-04-30 Thread Ryan Johnson
On 30/04/2013 12:59 PM, Richard Hipp wrote: On Thu, Mar 14, 2013 at 2:07 PM, Ryan Johnson wrote: Hi all, I'm running sqlite-3.7.13 on cygwin. Playing around with various TPC-H queries with my class recently, I hit a strangely slow query and don't understand why it's so slow. http://www.sqlit

Re: [sqlite] Query optimizer bug?

2013-04-30 Thread Richard Hipp
On Thu, Mar 14, 2013 at 2:07 PM, Ryan Johnson wrote: > Hi all, > > I'm running sqlite-3.7.13 on cygwin. Playing around with various TPC-H > queries with my class recently, I hit a strangely slow query and don't > understand why it's so slow. > http://www.sqlite.org/draft/queryplanner-ng.html --

Re: [sqlite] Query optimizer bug?

2013-03-14 Thread Ryan Johnson
On 14/03/2013 3:09 PM, Richard Hipp wrote: Nitpick: A "bug" means it gets the wrong answer, which is not the case here. What you are reporting here is not a bug but an optimization opportunity. Oops... you're right. Sorry about that. On Thu, Mar 14, 2013 at 2:07 PM, Ryan Johnson wrote: The

Re: [sqlite] Query optimizer bug?

2013-03-14 Thread Richard Hipp
Nitpick: A "bug" means it gets the wrong answer, which is not the case here. What you are reporting here is not a bug but an optimization opportunity. On Thu, Mar 14, 2013 at 2:07 PM, Ryan Johnson wrote: > The offending query (slightly modified version of Q7: > > select count(*) > from supplier

[sqlite] Query optimizer bug?

2013-03-14 Thread Ryan Johnson
Hi all, I'm running sqlite-3.7.13 on cygwin. Playing around with various TPC-H queries with my class recently, I hit a strangely slow query and don't understand why it's so slow. The schema and dataset generator are available at tpc.org, and end of this message has instructions to replicate