<div dir="ltr">Hi Christian <br><br>Yes we start using IN operator instead of substring aggregate function <br><br>Thank you so much for your Response :) <br><br>Regards <br>Devang Dhandhalya </div><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 1, 2022 at 6:02 PM Christian Berger <<a href="mailto:christian.berger@foncloud.net" target="_blank">christian.berger@foncloud.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
Hi,
<br>
<br>
Am 01.04.22 um 14:20 schrieb Devang Dhandhalya via FreeSWITCH-users:
<br>
<font color="#000000">> and rate=(select min(rate) from deckrate where
</font><br>
<font color="#000000">> code=SUBSTRING('12345566878',1,length(code))) limit 1
</font><br>
<br>
Here is your problem. That statement will mean that your database will
<br>
have to manually go through _all_ entries in the decrate table as it
<br>
needs to calculate the SUBSTRING for every entry.
<br>
<br>
The better solution is to have an index on "code" an a query like...
<br>
code in ('12345678', '1234567', '123456'...'12','1')
<br>
<br>
With such a query the index will be used and it'll be _much_ faster.
<br>
<br>
<br>
Christian Berger<br><br><br> <img src="cid:17fe528e20538e7588a1" width="119" height="64"><br><br>foncloud GmbH & Co KG<br>Hahlweg 2a<br>36093 Künzell<br><br>Tel: / <br>Fax: +49 661 968990-99<br><br>
<p class="MsoNormal"><span lang="EN-US">Email: </span><span lang="EN-US"><a href="mailto:Christian.Berger@foncloud.net" target="_blank">Christian.Berger@foncloud.net</a><br>
Web: <a href="http://www.foncloud.net" target="_blank"><span style="color:black;text-decoration:none">www.foncloud.net</span></a><br></span></p><p class="MsoNormal"><br><span lang="EN-US"></span><span lang="EN-US"></span></p><div><div lang="x-unicode"><div><p class="MsoNormal"><b><span style="color:black">P.S.: Wussten Sie schon?<span> </span></span></b></p><p class="MsoNormal"><b><span style="color:black">Unter<span> <a href="https://www.foncloud.net/wissen" target="_blank">https://www.foncloud.net/wissen</a> </span>finden Sie zahlreiche Informationen und hilfreiche Artikel rund um unsere Produkte und Services.</span></b></p><p class="MsoNormal"><span style="font-size:11pt"> </span><font size="1"><br></font></p><p class="MsoNormal"><font size="1">Registergericht: Amtsgericht Fulda, Persönlich haftende Gesellschafterin der foncloud GmbH&Co.KG: Global Brain Network GmbH</font></p></div></div></div><font size="1">Geschäftsführer der Global Brain Network GmbH: Peter Krug Sitz der Gesellschaft: Künzell.<br><br>Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.<br><br>This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.</font><br><br><br><br>
</div>
_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
Build your next product on our scalable cloud platform.<br>
<br>
Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div></div>
<br>
<div><font face="Arial" size="2" style="background-color:white" color="#808080"><b>Disclaimer</b></font></div><div><div><span style="background-color:white;color:rgb(128,128,128);font-family:Arial;font-size:small">In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded.</span></div></div><div><span style="background-color:white;color:rgb(128,128,128);font-family:Arial;font-size:small"><br></span></div><div><font face="Arial" size="2" style="background-color:white" color="#808080"><b>Confidentiality</b></font></div><div><font face="Arial" size="2" style="background-color:white" color="#808080">This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error.</font></div><div><font face="Arial" size="2" style="background-color:white" color="#808080"><br></font></div><div><span style="background-color:white;color:rgb(128,128,128);font-family:Arial;font-size:small"><b>Caution for viruses, malware etc.</b></span></div><div><font face="Arial" size="2" style="background-color:white" color="#808080">This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems. </font></div>