Solved

what is the fastes way to search mysql?

Posted on 2008-10-22
3
186 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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…

738 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