Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

what is the fastes way to search mysql?

i want to search a database  that is made from  8,000,000 rows and eatch row have a link
like this link "http://www.google.co.uk/search?hl=en&q=ssds&btnG=Google+Search&meta="

and some rows have the same link

i want a command that can search the data base and find all the id of the rows that have the link that i want

for example
i give it
http://www.google.co.uk/search?hl=en&q=ssds&btnG=Google+Search&meta=
it give me
121223 id
3324 id
2324535 id
434343 id
343535 id
35353 id

thanks
0
mgtm3
Asked:
mgtm3
  • 2
1 Solution
 
Roger BaklundCommented:
We need a description of the database, but the SQL would be something like this:

SELECT id FROM tablename
WHERE url = 'http://www.google.co.uk/search?hl=en&q=ssds&btnG=Google+Search&meta='
0
 
mgtm3Author Commented:
i have the link and the id and the name of eatch man that posted the link

id -   data_link  -   d_user

when i use what you told me it take something like 80 seaconds to find the link
0
 
Roger BaklundCommented:
Probably because there is no index defined.

Show us the output of this SQL:

SHOW CREATE TABLE tablename

This will show what indexes are defined on the table.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now