Re: weighting (the results of) a query ?

From: "Peter Galbavy" <peter(dot)galbavy(at)knowtion(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: weighting (the results of) a query ?
Date: 2003-01-07 16:25:43
Message-ID: 023f01c2b669$6ce39270$4528a8c0@cblan.mblox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> Most likely you should write UNION ALL, not UNION. As given, the query
> will go through a pass of attempted duplicate-row-elimination, which is
> almost certainly not what you want.

Not sure - what I want is only one row per real row but ordered as per the
constants. When you say duplicate-row-elimination do you mean including the
'constant' weighting, in which case UNION ALL is probably right. At the
moment, the dataset returned appears correctly de-duplicated.

What I mean is when an image row has both 'eat static' in the caption and as
a keyword, I want it returned only once...

Peter

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-01-07 16:29:48 Re: [SQL] [PERFORM] 7.3.1 index use / performance
Previous Message Achilleus Mantzios 2003-01-07 16:21:19 Re: [SQL] 7.3.1 index use / performance