Re: weighting (the results of) a query ? - Mailing list pgsql-sql

From Peter Galbavy
Subject Re: weighting (the results of) a query ?
Date
Msg-id 023f01c2b669$6ce39270$4528a8c0@cblan.mblox.com
Whole thread Raw
In response to weighting (the results of) a query ?  ("Peter Galbavy" <peter.galbavy@knowtion.net>)
Responses Re: weighting (the results of) a query ?
List 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



pgsql-sql by date:

Previous
From: Achilleus Mantzios
Date:
Subject: Re: [PERFORM] 7.3.1 index use / performance
Next
From: Tom Lane
Date:
Subject: Re: [PERFORM] 7.3.1 index use / performance