Help on partial column index
Posted in 2011
Topics: General Discussion
Hello, my friends.
(IDS 11.70.FC3 (test machine) on linux_64 redhat based)
I´m reading the Chat with Labs - New Features document (Mr John Miller III
presentation), and I saw a topic saying that I can now create an index on the
first N bytes of a char column.
His example was:
create index index1 on tab1( col1(3) );
I´ve created my test table as:
create table a (codigo char(44) not null);
But when I tried to add the partial index, it shows me "syntax error".
create index ix_teste on a( codigo(3) );I´ve already tried brackets, instead of parenthesis, nothing worked.
Information center is not updated about it, yet. At least all my searches
found nothing about this subject.
Would somebody help me?
Thanks a lot!
REgards.
You need to specify the starting byte and length:
create index index1 on tab1( col1(1,3) );
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Thu, Jul 14, 2011 at 9:01 AM, ALEXANDRE MARINI <amarini@fazenda.ms.gov.br
> wrote:
> Hello, my friends.
> (IDS 11.70.FC3 (test machine) on linux_64 redhat based)
> I reading the Chat with Labs - New Features document (Mr John Miller III
> presentation), and I saw a topic saying that I can now create an index on
> the
> first N bytes of a char column.
>
> His example was:
> create index index1 on tab1( col1(3) );>
> Ie created my test table as:
> create table a (codigo char(44) not null);>
> But when I tried to add the partial index, it shows me "syntax error".
> create index ix_teste on a( codigo(3) );> Ie already tried brackets, instead of parenthesis, nothing worked.
>
> Information center is not updated about it, yet. At least all my searches
> found nothing about this subject.
>
> Would somebody help me?
> Thanks a lot!
> REgards.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--bcaec51b9a01bc7ec304a80b20e8
Hi Art!
Sorry, it didn´t work, also, I´ve already tried that syntax.
As suggested, my statement was changed to:
create index ix_a on a( codigo(1,9) );
201: A syntax error has occurred.
I even tried from "0" to "length-1", but nothing changed...
Am I doing something wrong?
Thanks for your help.
Em 14/07/2011 13:47, Art Kagel escreveu:
> You need to specify the starting byte and length:
>
> create index index1 on tab1( col1(1,3) );>
> Art S. Kagel
> Advanced DataTools (www.advancedatatools.com)
> Blog: http://informix-myview.blogspot.com/
>
> Disclaimer: Please keep in mind that my own opinions are my own opinions and
> do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
> organization with which I am associated either explicitly, implicitly, or by
> inference. Neither do those opinions reflect those of other individuals
> affiliated with any entity with which I am affiliated nor those of the
> entities themselves.
>
> On Thu, Jul 14, 2011 at 9:01 AM, ALEXANDRE MARINI<amarini@fazenda.ms.gov.br
>> wrote:
>> Hello, my friends.
>> (IDS 11.70.FC3 (test machine) on linux_64 redhat based)
>> I reading the Chat with Labs - New Features document (Mr John Miller III
>> presentation), and I saw a topic saying that I can now create an index on
>> the
>> first N bytes of a char column.
>>
>> His example was:
>> create index index1 on tab1( col1(3) );>>
>> Ie created my test table as:
>> create table a (codigo char(44) not null);>>
>> But when I tried to add the partial index, it shows me "syntax error".
>> create index ix_teste on a( codigo(3) );>> Ie already tried brackets, instead of parenthesis, nothing worked.
>>
>> Information center is not updated about it, yet. At least all my searches
>> found nothing about this subject.
>>
>> Would somebody help me?
>> Thanks a lot!
>> REgards.
>>
>>
>>
>>
>
*******************************************************************************
>> Forum Note: Use "Reply" to post a response in the discussion forum.
>>
>>
> --bcaec51b9a01bc7ec304a80b20e8
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Alexandre Marini
Tecnologia da Informação - DBA
msn: alexandre_marini@hotmail.com
SEFAZ-MS / SGI-UGSR / Sistemas IBM-Informix
<Cert-Info-Mgmt_color.jpg>
IBM Certified System Administrator - Informix Dynamic Server V10 / V11 /
V11.70
IBM Information Management Informix Technical Professional v3