Re: dbf files and indexes

2010-05-29 Thread D'Arcy J.M. Cain
On Sat, 29 May 2010 13:45:37 -0700 (PDT) Bryan wrote: > You're not doing the query optimizer any favors. It can normalize the > query to the same thing either way, so we might as well write it to be > readable by people. I can read D'Arcy's at a glance. Assuming that you are running a decent *cou

Re: dbf files and indexes

2010-05-29 Thread Bryan
Christian Heimes wrote: [D'Arcy J.M. Cain had written:] > > SELECT * FROM NumberOfPets > > WHERE name IN (SELECT name FROM CatLovers) OR > >    name IN (SELECT name FROM DogLovers) > > ORDER BY name; > > A good way is to use SQL with JOINs instead of horrible nested > selects. Do show us your joi

Re: dbf files and indexes

2010-05-27 Thread Christian Heimes
Finally, are these SQL databases? The best way of getting information is with SQL. SELECT * FROM NumberOfPets WHERE name IN (SELECT name FROM CatLovers) OR name IN (SELECT name FROM DogLovers) ORDER BY name; A good way is to use SQL with JOINs instead of horrible nested selects. Although S

Re: dbf files and indexes

2010-05-27 Thread Ethan Furman
D'Arcy J.M. Cain wrote: On Thu, 27 May 2010 12:45:58 -0700 Ethan Furman wrote: Let's say I have two tables: CatLoversDogLovers --- --- | name | age | | name | age | |-| |-| [...] NumberOf

Re: dbf files and indexes

2010-05-27 Thread Ethan Furman
Ethan Furman wrote: Let's say I have two tables: Okay, let's say I have three tables instead. ;p -- http://mail.python.org/mailman/listinfo/python-list

Re: dbf files and indexes

2010-05-27 Thread D'Arcy J.M. Cain
On Thu, 27 May 2010 12:45:58 -0700 Ethan Furman wrote: > Let's say I have two tables: > > CatLoversDogLovers > --- --- > | name | age | | name | age | > |-| |-| [...] > > NumberOfPets > -

dbf files and indexes

2010-05-27 Thread Ethan Furman
Let's say I have two tables: CatLoversDogLovers --- --- | name | age | | name | age | |-| |-| | Allen | 42 | | Alexis| 7 | | Jerod | 29 | | Michael | 21 | | Samuel