在大数据中查找一条数据

#1 Kenneth

我在几百万条数据中查找一条数据,查询的很慢。加索引,分区。没多大感觉。
大侠们帮忙想想办法。
问题1.是语句有问题?
"select hdl from m_pewer where pdate='".$sdate."' and sid='".$sid."' and uname='".$_SESSION["userinfos"]["uname"]."' and ptime='".$stime."'"
问题2.数据表应该怎么建合适这种大数据的。

2013-07-02 10:25:37

#2 jake

google一下学习explain的用法

2013-07-02 10:32:03

#3 Kenneth

jake 发表于 2013-7-2 10:32
google一下学习explain的用法
问题已经解决,非常感谢你。

2013-07-02 14:45:17