OT: where to get mySQL questions answered?

From: Zaphod Beeblebrox (foo_at_spamsnothere.org)
Date: 12/29/03


Date: Mon, 29 Dec 2003 21:33:22 GMT

Hi:

After resolving some performance issues with mysql in building initial
queries for a search engine, I'm experiencing more crippling problems as
soon as I add an OR to my WHERE x LIKE '%blah%' type queries.

Does anyone know where I should ask this type of question? I can't find any
usenet groups on my ISP's server that match, and am in a bit of a bind here.

If anyone could be so kind as to point me in the right direction as to where
to ask, or can answer the following question, it would be greatly
appreciated.

My php code dynamically builds an sql query. If I type in a single word in
a text box, it generates something like this:

SELECT tus_site.arsi_database_id AS foo, tus_site.arsi_local_site_num,
tus_site.arsi_initial_site_num FROM tus_site INNER JOIN site_name_common ON
tus_site.arsi_database_id=site_name_common.sinaco_arsi_database_id INNER
JOIN site_name_alternate ON
tus_site.arsi_database_id=site_name_alternate.sinaalt_arsi_database_id INNER
JOIN oral_history ON
tus_site.arsi_database_id=oral_history.orhi_arsi_database_id WHERE
oral_history.orhi_desc LIKE '%things%' OR tus_site.arsi_location_desc LIKE
'%things%'

If more than one word is typed in, it adds to the WHERE clause.

With even one word being searched for (basically two criteria in the where
clause) mysqld locks up completely on Win98. If I simplify the query by
hand to have only one criterion in the WHERE clause, it works just fine and
returns expected results. I've used similar queries in a number of other
database systems, and never had a problem. Any insight? As a side note, to
get as far as I have so far, I had to manually add an index to the tus_site
table.



Relevant Pages

  • Re: OT: where to get mySQL questions answered?
    ... >queries for a search engine, I'm experiencing more crippling problems as ... >soon as I add an OR to my WHERE x LIKE '%blah%' type queries. ... >If more than one word is typed in, it adds to the WHERE clause. ...
    (comp.lang.php)
  • Re: JOIN on multiple conditions
    ... You must use the OUTER JOIN syntax, of course, ... >but if you learn only the INNER JOIN syntax does it change the way you ... More complicated queries should not be written by ... condition is placed in the ON or in the WHERE clause. ...
    (microsoft.public.sqlserver.programming)
  • Re: error -2147217904 - how to fix :o( ?
    ... If the saved queries don't have WHERE clauses, yes, the saved ... When I say on-the-fly SQL, ... use the base saved query and add a WHERE clause. ...
    (comp.databases.ms-access)
  • Re: how to use partitions once created?
    ... Your example queries worked perfectly. ... is a Where clause and a slice the same thing - semantically ... > Please do not send email directly to this alias. ...
    (microsoft.public.sqlserver.olap)
  • Re: problem getting a query to recognize "Not" and "<>" in a value list combo box
    ... When I think of queries, ... over for a while before I can really grasp it conceptually. ... The WHERE clause is just a Boolean algebra expression which evaluates to ... if I want to explicitly retrieve all records. ...
    (microsoft.public.access.forms)