CRM-12326 alter quicksearch to improve speed.
authoreileenmcnaugton <eileen@fuzion.co.nz>
Sat, 22 Aug 2015 08:18:32 +0000 (20:18 +1200)
committereileenmcnaugton <eileen@fuzion.co.nz>
Sat, 22 Aug 2015 08:18:32 +0000 (20:18 +1200)
commita5728a283107a72f4643e435c1c7f214f918aa53
treeb78e0ac70d84baf7d248f15674238cfd7a4714ff
parentc14e8c3642d6ca66e05c50312b1aa9937a80828d
CRM-12326 alter quicksearch to improve speed.

This commit removes the OR in favour of a union. With the Or the query does not
index properly. On a DB of 300k contacts this commit showed quicksearch query going from 3.895 seconds
to 0.015  seconds
api/v3/Contact.php