[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



+-------------+-------+---------------+---------+---------+------+-------+----------------------------+

| table       | type  | possible_keys | key     | key_len | ref  | rows  | Extra                      |

+-------------+-------+---------------+---------+---------+------+-------+----------------------------+

| flow | range | st_time       | st_time |       8 | NULL | 72621 | where used; Using filesort |

+-------------+-------+---------------+---------+---------+------+-------+----------------------------+

1 row in set (0.10 sec)

Now the problem is when i change the time on the date 2005-08-08 00:00:00 to 2005-08-08 12:30:00 say, i get 

+-------------+------+---------------+------+---------+------+--------+----------------------------+

| table       | type | possible_keys | key  | key_len | ref  | rows   | Extra                      |

+-------------+------+---------------+------+---------+------+--------+----------------------------+

| flow | ALL  | st_time       | NULL |    NULL | NULL | 389597 | where used; Using filesort |

+-------------+------+---------------+------+---------+------+--------+----------------------------+

1 row in set (0.06 sec)

Meaning mysql is not using index key st_time for the select query. Do anyone knows what may be going on? I think it has to something to do with the decision made by the optimizer but i don't know exactly why mysql is not using indexing on the second case. Any pointers will be appreciated



Sincerely,

Kofi Boateng
Applications Developer
Securiant Inc
690 Powers Ferry Road Suite 290
Atlanta, Ga 30339
<a  rel="nofollow" href="http://www.securiant.com";>http://www.securiant.com</a>
-------------- next part --------------
An HTML attachment was scrubbed...



</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00103" href="msg00103.html">[ale] Indexing datetime field in mysql?</a></strong>
<ul><li><em>From:</em> james.sumners at gmail.com (James Sumners)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00100.html">[ale] Cisco VPN on AMD64, Anyone?</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00102.html">[ale] access problem with vsftpd on slackware</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00093.html">[ale] Sporadic TCP/IP packet loss</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00103.html">[ale] Indexing datetime field in mysql?</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00101"><strong>Date</strong></a></li>
<li><a href="threads.html#00101"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>