hi
i have a parent table and 3 child table.
Now i am query all the 3 child table, for some name, and if itis found in any 1 child table then get
the parent name.
this query take a lot of time to return result say 3-4 min.
it check totally 1900 entry including all the 3 child table.
is there any way i can get the result faster than this.
the query is something like this
select distinct(parent.name) from PARENT TABLE as parent where
( parent .id = child(1).id and child(1).name like "% tom%" and child(1).name like "%cammy%") or
( parent .id = child(2).id and child(2).name like "% tom%" and child(2).name like "%cammy%") or
( parent .id = child(3).id and child(3).name like "% tom%" and child(3).name like "%cammy%");
can any one help me to write a better way, so that time taken to return to result is reduce.
probably indexing to name in child table or any thing .