dbf files and indexes

Bryan bryanjugglercryptographer at yahoo.com
Sat May 29 16:45:37 EDT 2010


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 join that makes D'Arcy's nested select horrible by
comparison.

> Although SQL is declarative, you shouldn't make the work of the query
> optimizer so hard.

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.


--
--Bryan Olson



More information about the Python-list mailing list