OT: where to get mySQL questions answered?
From: Zaphod Beeblebrox (foo_at_spamsnothere.org)
Date: 12/29/03
- Next message: Daniel Tryba: "Re: Whats PHPs version of ASPs application scope variable"
- Previous message: Adam Nørregaard: "Re: A small problem (SQL+search+array+distinct)"
- Next in thread: Five Cats: "Re: OT: where to get mySQL questions answered?"
- Reply: Five Cats: "Re: OT: where to get mySQL questions answered?"
- Reply: Randell D.: "Re: where to get mySQL questions answered?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Daniel Tryba: "Re: Whats PHPs version of ASPs application scope variable"
- Previous message: Adam Nørregaard: "Re: A small problem (SQL+search+array+distinct)"
- Next in thread: Five Cats: "Re: OT: where to get mySQL questions answered?"
- Reply: Five Cats: "Re: OT: where to get mySQL questions answered?"
- Reply: Randell D.: "Re: where to get mySQL questions answered?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|