Solved

what is the fastes way to search mysql?

Posted on 2008-10-22
3
183 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
ID: 22780670
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
ID: 22780743
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
ID: 22780779
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

911 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

20 Experts available now in Live!

Get 1:1 Help Now