Speed of query
I have a table with 200,000 records.
it has five fields:
it is used to monitor searches on multiple websites.
I want to return all the terms in a single query and have them presented in a table, ALL 200,000 records.
It works but it takes an absolute age, about 1min20sec
I'm not an expert in sql, but the query i have to retrieve the records is:
Is there any way of speeding this up? i looked at indexes and created one on strDate but i'm not sure if it did anything. my explain looks like:
Select * From tblSearch Where tblSearch.strDate Like '" & strQueryDate & "'"
select type: simple
extra: using where
all other fieilds are empty.
thanks for any help guys
use some of the built in optimization tools or pick up a book on optimization. try rebuilding indexes on that table to see if it helps too.
what optimization tools, where do i find those?
they vary from dbms to dbms. look into toad, it has a freeware version. you can also look at the plan for a query (can't be more specific, it'll vary depending on what database you use.)
is strDate indexed? and I agree with Chazzy, rebuild your indexes.
This adds an index to a column.
This repairs your index.
ALTER TABLE tableName ADD INDEX(columnName);
You can type this in your command prompt when you log into a mysql terminal.
REPAIR TABLE tbl_name QUICK;
"Everything in a web browser."
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)