Slow query
Posted by:
Dave Titan
Date: October 23, 2010 03:27AM
Hi all,
( Sorry for my bad english )
I read the forum, but could not find the answer.
My problem is
i have a table with 700.000 rows
I need to do more then one search on a page
then is all slow
I think that my code are not so correct
Php 5
MySQL client version: 4.1.21
Here is it
$query = "SELECT tube, title, artist, id, son, pics, tube2, views FROM lyrics WHERE tube2 = 'Entree' ORDER BY views DESC LIMIT 10";
$doquery = mysql_query($query);
while($lyricsfetch = mysql_fetch_array($doquery))
{
$tube = $lyricsfetch[tube];
$title = $lyricsfetch[title];
$artist = $lyricsfetch[artist];
$id = $lyricsfetch[id];
$son = $lyricsfetch[son];
$pics = $lyricsfetch[pics];
$tube2 = $lyricsfetch[tube2];
$views = $lyricsfetch[views];
Echo $tube (etc...)
}
I doe this 4 times on the same page
with different search query of course (ex: FROM lyrics WHERE tubernb2 = 'New')
How can i make that the result query's showing faster ?
Thanks for help
Best regards.
Dave
Subject
Views
Written By
Posted
Slow query
2376
October 23, 2010 03:27AM
1105
October 26, 2010 10:42PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.