Solved

what is the fastes way to search mysql?

Posted on 2008-10-22
3
182 Views
Last Modified: 2008-10-23
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
Comment
Question by:mgtm3
  • 2
3 Comments
 
LVL 39

Expert Comment

by:Roger Baklund
Comment Utility
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
 

Author Comment

by:mgtm3
Comment Utility
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
 
LVL 39

Accepted Solution

by:
Roger Baklund earned 500 total points
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now