Re: [sqlite] sqlite Query Optimizer

2014-10-16 Thread Simon Slavin

On 16 Oct 2014, at 11:07am, Prakash Premkumar  wrote:

> Are there any projects where , sqlite optimizer has been extended to add
> System R

The optimizer currently built into SQLite does the same job as what you're 
thinking of as "System R".  It is not possible to use both together.

You should be aware that the System R paper is now 40 years old.  We have got 
considerably better and learned considerably more about databases since System 
R was devised.  My guess is that if you replaced the current SQLite 
optimization system with System R SQLite would get worse, not better.

> or other algorithms ?

I will let the developers answer that.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite Query Optimizer

2014-10-16 Thread Prakash Premkumar
Thanks a lot Simon.

Are there any projects where , sqlite optimizer has been extended to add
System R or other algorithms ?
I browsed through the github repository and could not find any.

Thanks a lot for your time.

Regards
Prakash

On Thu, Oct 16, 2014 at 12:49 PM, Simon Slavin  wrote:

>
> On 16 Oct 2014, at 7:50am, Prakash Premkumar 
> wrote:
>
> > Does sqlite implement the pointers in the System R Algorithm ?
>
> SQLite does not implement the System R Algorithm, so no, it doesn't
> implement the pointers from System R.  It implements the algorithms
> described in the two references just cited.  Those algorithms have some
> things in common with System R but are not the same as it.
>
> > Like
> > assigning selectivity factors for predicates in where clause?
>
> SQLite does something equivalent to this.  Read about the ANALYZE command
> which is documented on the SQLite web site, and examine the type of data it
> puts in the tables it creates.  The ANALYZE command is discussed in the two
> references just cited.
>
> You've asked some detailed questions on this list which could be answered
> by reading the documentation available to on the SQLite web site.  It might
> be worth trying to get your answers from the web site first, and if you
> still want to post, citing the pages you've already read so we don't point
> them out to you in our own answers.
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite Query Optimizer

2014-10-16 Thread Simon Slavin

On 16 Oct 2014, at 7:50am, Prakash Premkumar  wrote:

> Does sqlite implement the pointers in the System R Algorithm ?

SQLite does not implement the System R Algorithm, so no, it doesn't implement 
the pointers from System R.  It implements the algorithms described in the two 
references just cited.  Those algorithms have some things in common with System 
R but are not the same as it.

> Like
> assigning selectivity factors for predicates in where clause?

SQLite does something equivalent to this.  Read about the ANALYZE command which 
is documented on the SQLite web site, and examine the type of data it puts in 
the tables it creates.  The ANALYZE command is discussed in the two references 
just cited.

You've asked some detailed questions on this list which could be answered by 
reading the documentation available to on the SQLite web site.  It might be 
worth trying to get your answers from the web site first, and if you still want 
to post, citing the pages you've already read so we don't point them out to you 
in our own answers.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite Query Optimizer

2014-10-15 Thread Prakash Premkumar
Thanks for your reply Simon.
I have read through those links.

Does sqlite implement the pointers in the System R Algorithm ? Like
assigning selectivity factors for predicates in where clause?
Link to System R Algorithm:
https://www.cs.duke.edu/courses/spring03/cps216/papers/selinger-etal-1979.pdf

Thanks a lot for your time.

Regards
Prakash

On Wed, Oct 15, 2014 at 5:36 PM, Simon Slavin  wrote:

>
> On 15 Oct 2014, at 12:54pm, Prakash Premkumar 
> wrote:
>
> > I'm trying to understand the sqlite select query optimizer. It works by
> > assigning costs to each relation in FROM clause.
>
> That is only a little bit of how it works.  Have you read these ?
>
> 
> 
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite Query Optimizer

2014-10-15 Thread Simon Slavin

On 15 Oct 2014, at 12:54pm, Prakash Premkumar  wrote:

> I'm trying to understand the sqlite select query optimizer. It works by
> assigning costs to each relation in FROM clause.

That is only a little bit of how it works.  Have you read these ?




Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users