Advertisement

08.07.2008 at 04:20AM PDT, ID: 23628882
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.6

Need to speed up an SQL query

Asked by CreativewithTechnology in MySQL Server

Tags:

I have this query which has been generated by another developer. Basically it's a query which returns results based on a keyword entered by the visitor. The problem is, I now need to generate a list of keywords, along with a number next to each keyword showing how many items match the keyword.

I've generated the list of keywords, and for each keyword I made a simply query to search for matching keywords in the database and return the count, which worked a treat. However, the number of matching keywords was different to the number being returned by the search itself.

I need to overcome this issue, so I've looked at the query used to return the search results, but when I use this same query to count the number of matching keywords, it takes 45 seconds to generate the page. This is because there are about 400-500 keywords in the table, so for each keyword it's running the query to count the number of matches.

So basically, I need the attached query to run quicker.

Can anyone help?Start Free Trial
1:
$query = "select format_id, dam_assets.asset_id as asset_id,dam_assets.name as assetname,dam_assets.description as assetdesc from dam_assets,dam_asset_media as all_media, dam_xref_data as media_xref, dam_xref_data as data_xref, dam_asset_data as all_data where all_media.asset_id = dam_assets.asset_id and all_data.asset_id = dam_assets.asset_id and media_xref.xref_data_id = all_media.format_id and data_xref.xref_data_id = all_data.xref_data_id and ( exists (select 1 from dam_asset_keywords as keywords where keywords.asset_id = dam_assets.asset_id and (keyword = '".addslashes($keyword)."' or keyword like '".addslashes($keyword)." %' or keyword like '% ".addslashes($keyword)." %' or keyword like '% ".addslashes($keyword)."' ))) group by asset_id,assetname,assetdesc order by assetname";
[+][-]08.07.2008 at 05:50AM PDT, ID: 22180388

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2008 at 06:00AM PDT, ID: 22180461

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.07.2008 at 06:20AM PDT, ID: 22180619

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2008 at 06:26AM PDT, ID: 22180668

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.07.2008 at 06:32AM PDT, ID: 22180718

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2008 at 06:45AM PDT, ID: 22180838

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.07.2008 at 06:49AM PDT, ID: 22180882

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2008 at 06:54AM PDT, ID: 22180926

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.07.2008 at 07:01AM PDT, ID: 22180996

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2008 at 07:13AM PDT, ID: 22181121

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.07.2008 at 07:17AM PDT, ID: 22181151

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2008 at 07:39AM PDT, ID: 22181386

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2008 at 08:12AM PDT, ID: 22181734

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.07.2008 at 08:25AM PDT, ID: 22181879

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MySQL Server
Tags: MYSQL, SQL
Sign Up Now!
Solution Provided By: virmaior
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628