Re: [HACKERS] psql nested queries with 2000+ records
От | Bruce Momjian |
---|---|
Тема | Re: [HACKERS] psql nested queries with 2000+ records |
Дата | |
Msg-id | 199803220317.WAA01526@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] psql nested queries with 2000+ records (Coronach <coronach@hill-b-073.resnet.purdue.edu>) |
Ответы |
Re: [HACKERS] psql nested queries with 2000+ records
|
Список | pgsql-hackers |
What does this show in explain? Does it use an index? select name from games where mfr = '' > > At 09:54 AM 3/21/98 -0500, Bruce Momjian wrote: > > >Try it without the LIKE, with just an equals. > > amusements=> explain select name from games where name in (select name from > game > s where mfr = ''); > NOTICE: QUERY PLAN: > > Seq Scan on games (cost=207.95 size=446 width=12) > SubPlan > -> Seq Scan on games (cost=207.95 size=1 width=12) > > EXPLAIN I ran this test: test=> explain select * from pg_proc where oid in (select oid from pg_proc where oid =3); NOTICE: QUERY PLAN: Seq Scan on pg_proc (cost=48.90 size=91 width=122) SubPlan -> Index Scan on pg_proc (cost=2.05 size=1 width=4) and it used the index in the subquery. Please let us about the above test. -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)
В списке pgsql-hackers по дате отправления: