Re: External search engine, advice

From: mlw <markw(at)mohawksoft(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: External search engine, advice
Date: 2001-05-19 16:15:41
Message-ID: 3B069C2D.BDE0F2E6@mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
>
> mlw <markw(at)mohawksoft(dot)com> writes:
> > freedb=# select * from cdsongs where songid = ftss_results() ;
> > ERROR: Set-valued function called in context that cannot accept a set
>
> '=' is a scalar operation. Try
>
> select * from cdsongs where songid IN (select ftss_results());

I was afraid you'd say that. That does not use indexes.

It is pointless to use a text search engine if the result has to perform a
table scan anyway.

If I do:

create temp table fubar as select ftss_results() as songid;
select * from cdsongs where songid = fubar.songid;

That works, but that is slow and a lot of people have emotional difficulties
with using temporary tables. (Oracle syndrome) Also, an 'IN' clause does not
preserve the order of the results, where as a join should.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message mlw 2001-05-19 16:18:40 Re: External search engine, advice
Previous Message Larry Rosenman 2001-05-19 16:04:37 Re: C++ Headers