Subject | Re: [firebird-support] Re: Slow query with like '%xxx%' clause |
---|---|
Author | Tupy... nambá |
Post date | 2012-07-13T13:35:43Z |
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 <peixinhosdalua@...>
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]
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 <peixinhosdalua@...>
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]