Advertisement

09.16.2008 at 10:10AM PDT, ID: 23735873
[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!

9.2

why does this addition to my WHERE clause break my query?

Asked by bitt3n in MySQL Server

I have a functional query that selects data from records in tables synset and sense s1, based on the requirements that (1) selected records in these tables share a synsetid and (2) selected records in s1 contain specific values of wordid, and (3) selected records in s1 have a value for wordid that is not unique to that record (ie, there is at least one other record in s1 that has the same wordid):

SELECT synset.*, s1.* FROM sense s1, synset WHERE s1.synsetid=synset.synsetid AND (s1.wordid=124393 OR s1.wordid=19515 OR s1.wordid=85288) AND EXISTS (SELECT s2.synsetid FROM sense s2 WHERE s1.wordid = s2.wordid AND s1.synsetid <> s2.synsetid)

This query runs OK for synset and sense tables of about 200K records each (0.7 secs).

Another query I have that runs fine removes requirement (3) and adds a requirement (4) that s1.wordid must match the wordid in a third table, word:

SELECT synset.*, s1.*, word.lemma FROM sense s1, synset, word WHERE s1.synsetid=synset.synsetid AND (s1.wordid=124393 OR s1.wordid=19515 OR s1.wordid=85288) AND word.wordid=s1.wordid

However, if I try using both of these requirements (3) and (4):

SELECT synset.*, s1.*, word.lemma FROM sense s1, synset, word WHERE s1.synsetid=synset.synsetid AND (s1.wordid=124393 OR s1.wordid=19515 OR s1.wordid=85288) AND word.wordid=s1.wordid AND EXISTS (SELECT s2.synsetid FROM sense s2 WHERE s1.wordid = s2.wordid AND s1.synsetid <> s2.synsetid)

My query fails to complete (just runs on forever).

What am I doing wrong in the last query?Start Free Trial
[+][-]09.16.2008 at 10:13AM PDT, ID: 22490742

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.16.2008 at 10:20AM PDT, ID: 22490823

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.16.2008 at 10:20AM PDT, ID: 22490834

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.16.2008 at 10:44AM PDT, ID: 22491080

View this solution now by starting your 30-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
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 3
Solution Grade: A
 
 
[+][-]09.16.2008 at 11:04AM PDT, ID: 22491287

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.16.2008 at 11:10AM PDT, ID: 22491371

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.16.2008 at 11:23AM PDT, ID: 22491572

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.16.2008 at 11:36AM PDT, ID: 22491718

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.17.2008 at 09:31AM PDT, ID: 22500655

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.17.2008 at 10:03AM PDT, ID: 22501017

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.17.2008 at 10:56AM PDT, ID: 22501652

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.17.2008 at 11:00AM PDT, ID: 22501693

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.17.2008 at 11:50AM PDT, ID: 22502279

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.17.2008 at 12:10PM PDT, ID: 22502470

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]10.12.2008 at 01:05PM PDT, ID: 22698679

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

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

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628