On 2012-06-20, Sam Z J wrote:
> --0016e6d999db24c4c704c2ea7a97
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi all
>
> I'm curious how is wildcards at both ends implemented, e.g. LIKE '%str%'
> How efficient is it if that's the only search criteria against a large
> table? how much does inde
Alan Hodgson wrote on 20.06.2012 19:39:
I'm curious how is wildcards at both ends implemented, e.g. LIKE '%str%'
How efficient is it if that's the only search criteria against a large
table? how much does indexing the column help and roughly how much more
space is needed for the index?
Indexin
Em 20/06/2012 15:03, John R Pierce escreveu:
On 06/20/12 10:37 AM, Edson Richter wrote:
select * from tb1
where nome like 'CARLOS%' or reverse(nome) like reverse('%CARLOS')
Should return same results as
select * from tb1
where nome like '%CARLOS%'
no, that won't match 'abcCARLOSxyx'
On 06/20/12 10:37 AM, Edson Richter wrote:
select * from tb1
where nome like 'CARLOS%' or reverse(nome) like reverse('%CARLOS')
Should return same results as
select * from tb1
where nome like '%CARLOS%'
no, that won't match 'abcCARLOSxyx'
--
john r pierceN 3
Sam Z J wrote on 20.06.2012 19:10:
Hi all
I'm curious how is wildcards at both ends implemented, e.g. LIKE '%str%'
How efficient is it if that's the only search criteria against a large table?
how much does indexing the column help and roughly how much more space is
needed for the index?
if t
thank you all for the useful information =D
On Wed, Jun 20, 2012 at 1:39 PM, Alan Hodgson wrote:
> On Wednesday, June 20, 2012 01:10:03 PM Sam Z J wrote:
> > Hi all
> >
> > I'm curious how is wildcards at both ends implemented, e.g. LIKE '%str%'
> > How efficient is it if that's the only search
On Wednesday, June 20, 2012 01:10:03 PM Sam Z J wrote:
> Hi all
>
> I'm curious how is wildcards at both ends implemented, e.g. LIKE '%str%'
> How efficient is it if that's the only search criteria against a large
> table? how much does indexing the column help and roughly how much more
> space is
Just ocurred to me that would be possible to create some sort of
"hybrid" solution...
create index idx1 on tb1 (nome);
create index idx2 on tb1 (reverse(nome));
select * from tb1
where nome like 'CARLOS%' or reverse(nome) like reverse('%CARLOS')
Should return same results as
select * from tb
AFAIK, wildcards at both ends are not optimized at all, unless you use
some sort of specialized index (may be Gist or FullText).
Until 9.1 there is no such "Index Scan" feature, that would help (very
little).
Other databases (like MS SQL Server) solve this kind of query by
executing an Index Sca
On 6/20/2012 12:10 PM, Sam Z J wrote:
Hi all
I'm curious how is wildcards at both ends implemented, e.g. LIKE '%str%'
How efficient is it if that's the only search criteria against a large
table? how much does indexing the column help and roughly how much more
space is needed for the index?
if
On Wed, Jun 20, 2012 at 10:10 AM, Sam Z J wrote:
> Hi all
>
> I'm curious how is wildcards at both ends implemented, e.g. LIKE '%str%'
> How efficient is it if that's the only search criteria against a large
> table? how much does indexing the column help and roughly how much more
> space is neede
Hi all
I'm curious how is wildcards at both ends implemented, e.g. LIKE '%str%'
How efficient is it if that's the only search criteria against a large
table? how much does indexing the column help and roughly how much more
space is needed for the index?
if the answers are too long, please point m
12 matches
Mail list logo