Guilherme <gbmpere...@gmail.com> wrote:
> Well, I thought that if the execution followed a plan.. I could get for
> example, the cardinality from the results until a point, say a join.

I don't see how the conclusion follows from the premise. Why does "follows 
execution plan" have to imply "provides ready access to the data I happen to 
want"?

> Imagine a query with 15 joins.. the execution would make a join

What exactly does "make a join" mean? A join is a declarative construct - it 
specifies *what* data you want, not *how* to procur it. The query engine then 
does whatever it deems necessary to produce the data you've described with a 
join. 

> than, with
> the results from this join, make another join with results form other
> joins.. and so on..

That's not how database engines normally work. They don't explicitly produce 
intermediate resultsets.

Imagine that you have a phonebook, sorted by last name, first name. Suppose you 
want to find all people named John Smith. Would you first write down all 
Smiths, then go through that intermediate list looking for Johns? Or would you 
check for the first name as you go through the Smiths in the phonebook?

> I could get the cardinalities before the joins

You are engaging in wishful thinking.
-- 
Igor Tandetnik

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

Reply via email to