Re: the best way compare String

2011-12-04 Thread Andrés Tello
I use the soundex algorithm to generate a 4 characters fingerprint of the phonetic sound of a string, then I create an index over that field and serch for it. But soundex has an "issue"... the soundex fingerprint should be the same for victor than for bictor, but since the soundex index uses the

Re: Query query

2011-12-04 Thread Hal�sz S�ndor
Well, of that which you showed you _need_ only this, not really different from that which you wrote: SELECT COUNT(lib.Dewey) AS Have, ddn.Dewey AS DDN, ddn.Classification FROM s_library_dewey ddn LEFT OUTER JOIN s_library lib ON ddn.Dewey = FLOOR(lib.Dewey) GROUP BY ddn.Dewey As for

Re: the best way compare String

2011-12-04 Thread Shiva
Rafael, Without more details it is hard how you can optimize a query. 1. even though database 1TB, what about the table on which your running this query? Do you have any index on the column? How may chars long is the column? etc. 2. Run the explain and see what is the optimizer is telling - using

Re: the best way compare String

2011-12-04 Thread Reindl Harald
you THINK the engine is? WTF? fulltext if you need fulltext-search please read the manuals i linked! Am 04.12.2011 21:20, schrieb Rafael Valenzuela: > Hi Reindl, > Thanks for your quick answer, but i think the engine is MySAM but I'm not > sure, What type of index recomendais me, unique, full-te

Re: the best way compare String

2011-12-04 Thread Rafael Valenzuela
Hi Reindl, Thanks for your quick answer, but i think the engine is MySAM but I'm not sure, What type of index recomendais me, unique, full-text, etc..? Thanks a lot 2011/12/4 Reindl Harald > > > Am 04.12.2011 20:25, schrieb Rafael Valenzuela: > > Hi all, > > In one query, I am comparing a stri

Re: Query query

2011-12-04 Thread Arthur Fuller
You should still lose the pointless WHERE 1. Arthur On Sun, Dec 4, 2011 at 1:38 AM, Jan Steinman wrote: > DOH! Brain unfroze, and I realized I needed an aggregate: > > SELECT >COUNT(lib.Dewey) AS Have, >ddn.Dewey AS DDN, >ddn.Classification AS Classification > FROM s_library_dewey dd