Re: Duplicate Records On 5 Feb, 11:59, "Pankaj" <panah...@gmail.com> wrote:
> > The query is being cached - which is why it's quick the second time.
>
> > Use a join instead of a sub select. It will be much faster. There are
> > many examples of using joins in this way within these NGs.
>
> Thanks.... I use this query and the results are already faster
>
> SELECT *
> FROM talent as e1
> LEFT JOIN talent AS e2
> ON (e1.s_first_name=e2.s_first_name and e1.s_last_name=e2.s_last_name
> and e1.i_active=e2.i_active)
> WHERE (e2.i_talent_id IS NOT NULL)
> GROUP BY e1.s_first_name,e1.s_last_name,e1.i_active
> HAVING COUNT(*) > 1
>
> but this displays the results only once. I want to view the duplicates
> as well. Any suggestions ?
Could you supply an exort of the structure and some data for us to
play with. |