I agree but:
I have an system with 50.000+ clients with "%some%" too and it works vary
'fast'. In my system the sql executes in less than a second!

It does not use indexes as well but 50.000 records is too little to take
20s, 30s even 60s to run!

Yes Firebird dont will use the indexes but the key is how make the SQL
statement as I posted.
If you want send me this database and I will rewrite your SQL code to you.
Fabiano.

2012/7/13 Tupy... nambá <anhangu...@yahoo.com>

> **
>
>
> Doesn´t matter if just using Clientes or having a join or a view, a search
> with ' like "%word%" ' will not bring the results you want, this will ever
> use table scan and will be relatively slow for your needs.
>
> Direct in the database, the only approach were you will can speed up your
> searches will be using a solution like suggested by mr.Frank
> Schlottmann-Gödde.
>
> Using only sql commands and clauses, no way to get what you want. Ms.Ann
> Harrison already said "Firebird cannot use an index on partial word matches
> unless it knows the initial characters, so your queries are all going to
> require full table scans."(On Thu, Jul 12, 2012 at 12:08 PM). To this way,
> final words.
>
> ________________________________
> From: peixinhosdalua <peixinhosda...@yahoo.com>
> To: firebird-support@yahoogroups.com
> Sent: Friday, July 13, 2012 9:57 AM
> Subject: [firebird-support] Re: Slow query with like '%xxx%' clause
>
>
> What you suggest is not a solution because just using the tables CLIENTES,
> without any join or inside a view, the problem remains. I tried it.
>
> Also, i do not want to make 'word%' search. What i need is '%word%'.
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org/ and click the Resources item
>
> on the main (top) menu.  Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com/
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
> [Non-text portions of this message have been removed]
>
>  
>


[Non-text portions of this message have been removed]



------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/firebird-support/join
    (Yahoo! ID required)

<*> To change settings via email:
    firebird-support-dig...@yahoogroups.com 
    firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to