in reply to Does DBI handle table alias?
I am not sure an index would even help in this case, but I'd at least try one on column_2.select column_1 from theTable where column_2 in (123, 124) group by column_1 having count(*) = 2
Update: As indicated by tall_man below, the effectiveness of the index will depend on the distribution of the data in column_2.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Does DBI handle table alias?
by zebedee (Pilgrim) on Oct 08, 2004 at 01:12 UTC | |
|
Re^2: Does DBI handle table alias?
by tall_man (Parson) on Oct 08, 2004 at 15:02 UTC |