[英]SQL query takes less time in MYSQL, take more in PHP application
I have MYISAM
table and i wrote a FULL-TEXT
SQL query. 我有MYISAM
表,我写了一个FULL-TEXT
SQL查询。 When i execute this query, it takes < 0.53 seconds But when i execute this php+mysql application, it takes more than 1-2 minutes 当我执行此查询时,它花费<0.53秒,但是当我执行此php + mysql应用程序时,它需要超过1-2分钟
select concat(first_name, ' ', last_name) as `cand_full_name`, email
from resumes WHERE MATCH (thesis_text) AGAINST ('-java -j2ee -oracle -mysql -software' IN BOOLEAN MODE)
I am using mysqli_query($this->dbconnection, $this->query)
in query 我在查询中使用mysqli_query($this->dbconnection, $this->query)
PHP Code http://codepad.org/qufZBC16 PHP代码http://codepad.org/qufZBC16
I am not running any other sql query on this page. 我不在此页面上运行任何其他SQL查询。
Any Idea, why it's taking more time. 任何想法,为什么要花更多的时间。
Its very likely to be a charset issue. 它很可能是字符集问题。 Set the charset after connection to speed up query 连接后设置字符集以加快查询速度
http://php.net/manual/en/mysqli.set-charset.php#refsect1-mysqli.set-charset-description http://php.net/manual/en/mysqli.set-charset.php#refsect1-mysqli.set-charset-description
I'm not sure what charset your data Is stored in 我不确定您的数据存储在什么字符集
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.