Re: [sqlite] endless loop example
Just to quantify a cartisian join is a join operation that returns the product of the rows. So in the example given episodes 8 foods100 food_episodes 800 episodes e1, foods_episodes fe1, foods f, episodes e2, foods_episodes fe2 Result rows = 8*800*100*8*800 = 4,096,000,000 rows... (over 4 billion rows!) As you can see Cartesian joins get out of hand very quickly. P Kishor <[EMAIL PROTECTED]> wrote: On 3/21/08, Derek Developer wrote: > In trying to break my code with the seinfeld database examples, I found this. Derek, You are going to get much better help from the list, not to mention that you will probably get further with your "code breaking," if you provide some more background to your question. For example, what on earth is this "seinfeld database example" that you are talking about? > SELECT f.name as food, e1.name, e1.season, e2.name, e2.season FROM episodes > e1, foods_episodes fe1, foods f, episodes e2, foods_episodes fe2 > Why does this put SQLite into an endless loop? Probably because there is no JOIN clause causing a cartesian join across 5 tables. > (I am not using the shell tool, just preparing the statement as is and > stepping throug the rows) > ___ 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] endless loop example
On Mar 21, 2008, at 12:17 PM, Derek Developer wrote: > In trying to break my code with the seinfeld database examples, I > found this. > SELECT f.name as food, e1.name, e1.season, e2.name, e2.season FROM > episodes e1, foods_episodes fe1, foods f, episodes e2, > foods_episodes fe2 > Why does this put SQLite into an endless loop? Why do you figure it is an infinite loop? From the looks of the query it is probably just returning a very large number of rows. Dan. > (I am not using the shell tool, just preparing the statement as is > and stepping throug the rows) > > > > - > Looking for last minute shopping deals? Find them fast with Yahoo! > Search. > ___ > 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] endless loop example
On 3/21/08, Derek Developer <[EMAIL PROTECTED]> wrote: > In trying to break my code with the seinfeld database examples, I found this. Derek, You are going to get much better help from the list, not to mention that you will probably get further with your "code breaking," if you provide some more background to your question. For example, what on earth is this "seinfeld database example" that you are talking about? > SELECT f.name as food, e1.name, e1.season, e2.name, e2.season FROM episodes > e1, foods_episodes fe1, foods f, episodes e2, foods_episodes fe2 > Why does this put SQLite into an endless loop? Probably because there is no JOIN clause causing a cartesian join across 5 tables. > (I am not using the shell tool, just preparing the statement as is and > stepping throug the rows) > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] endless loop example
In trying to break my code with the seinfeld database examples, I found this. SELECT f.name as food, e1.name, e1.season, e2.name, e2.season FROM episodes e1, foods_episodes fe1, foods f, episodes e2, foods_episodes fe2 Why does this put SQLite into an endless loop? (I am not using the shell tool, just preparing the statement as is and stepping throug the rows) - Looking for last minute shopping deals? Find them fast with Yahoo! Search. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users