Re: optimize sql
От | Ross J. Reedstrom |
---|---|
Тема | Re: optimize sql |
Дата | |
Msg-id | 20000726105107.A19381@rice.edu обсуждение исходный текст |
Ответ на | optimize sql (pgsql-sql@fc.emc.com.ph (pgsql-sql)) |
Список | pgsql-sql |
On Wed, Jul 26, 2000 at 10:11:15PM +0800, pgsql-sql wrote: > HI! > > The SQL below is too slow. > > SELECT name FROM office, office_application > WHERE code = office_code > AND name NOT IN > (SELECT DISTINCT name FROM office, office_application > WHERE active = 't' AND code = office_code); > How does the output of the above differ from: SELECT name FROM office, office_application WHERE code = office_code AND active != 't'; Without knowing the table structures (which tables to active, code, and office_code belong to?) it's hard to suggest much else. Ross -- Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005
В списке pgsql-sql по дате отправления: