TenKMan
3/22/2007 6:29:00 PM
"Tom" <DEL_TO_REPLY@del.com> wrote in message
news:W6OdnV8529JzJp_bnZ2dnUVZ8vidnZ2d@bt.com...
> I've got a table called Lists , which has a record of each list item and
> each publication.
> As you can see there are 2 left joins ,in case there are records in
> either of these which are required in the search results to populate
> fields
>
> The results are grouped by all fields selected so that a distinct list is
> produced. Is this a performance issue, is there a better way of doing this
> search?
> Would denormalising the data help?
>
>
>
> Select a.sellref,a.selltext ,a.publication FROM Lists as A
> LEFT JOIN Dealers as d ON a.dealerCode = d.dealercode
> LEFT JOIN SellerFlags as af ON af.sellref = a.sellref
> WHERE a.publication='3B'
> GROUP BY a.sellref,a.selltext,a.publication
Can you explain how your query returns a resultset that differs from:
Select distinct A.sellref, A.selltext , A.publication FROM Lists as A
Your preserved table is Lists and, AFAIK, you use no information from the
unpreserved tables that would alter the resultset.