Hi all,
I have the following partial criteria for the SELECT statement. It involves the following fields ("senderemailaddress","cc","to"). The query definitely not very effective because it is very slow when I created 100,000 test records. But I must use AT() or $ to match the string within the fields.
Please give me suggestions on the indexing or alter the following partial query to improve the performance.
cond = cond + "((AT('@abc.com',senderemailaddress) > 0 AND cc = 'abcoutbox@nrsint.com' AND to = 'abcinbox@nrsint.com') ;
OR ;
(AT('@abc.com',senderemailaddress) = 0 AND AT('@abc.com',to) = 0)) and " ;
Thanks in advance.
Fred
I have the following partial criteria for the SELECT statement. It involves the following fields ("senderemailaddress","cc","to"). The query definitely not very effective because it is very slow when I created 100,000 test records. But I must use AT() or $ to match the string within the fields.
Please give me suggestions on the indexing or alter the following partial query to improve the performance.
cond = cond + "((AT('@abc.com',senderemailaddress) > 0 AND cc = 'abcoutbox@nrsint.com' AND to = 'abcinbox@nrsint.com') ;
OR ;
(AT('@abc.com',senderemailaddress) = 0 AND AT('@abc.com',to) = 0)) and " ;
Thanks in advance.
Fred