here you are an article in opensource
https://opensource.com/article/17/5/speed-your-mysql-queries-300-times?sc_cid=70160000000xYIuAAM
Best regards,
Thanks
To help knowledgeable users like you FWMARIABD provides
oCn:Explain( cSql, [aParms] )
Many of us here like me are beginners. This article is good for us. There is something to be learnt from that comment too, even if it sounds arrogant. There are other comments also that are informative.
Many of us like me are XBase programmers trying to migrate to RDBMs. May be in my view the only purpose of index is to SET ORDER and navigate in that order. I may not even be knowing that indexes are used by the RDD to optimize filters. Even if I know that I may not be knowing how to build a filter expression (or index expression) to take advantage of the optimization.
It is from this stage many of us need to learn. I will again learn my mistakes after I start adding indexes like salt and pepper.
I consider that the above article is useful because:
1) I now learn that there is a need to optimize queries. This is the most important lesson. Till yesterday I was writing queries the way I liked and blaming other factors or libraries for slow performance.
2) I know that indexes play a role in optimization. This brings me to the point that optimization begins with database design.
3) I know how to examine my SQL statements. Good for many of us who did not know the existence of "EXPLAIN" and how to use it.
This is a good beginning.
ariston.ap wrote:What is less known is that most SQL functions totally ignore indexes and incite a full table scan.
ariston.ap wrote:Or that adding indexes like pepper and salt can actually SLOW down a database.
ariston.ap wrote:Or SQL that totally works for one RDBMS will not necessarily perform very well on another.
What is less known is that most SQL functions totally ignore indexes and incite a full table scan.
nageswaragunupudi wrote:
What is less known is that most SQL functions totally ignore indexes and incite a full table scan.
This is a fact.
nageswaragunupudi wrote:There are situations where the optimizer decides table scan is faster than index scan.
No, this is simply not true.