Problem with fragmentation by expression
Posted in 1999
Topics: Storage & Space Management, Versions, Editions & End-of-Life
Hi all:
I'm running IDS 7.30 FC5 on DEC Alpha8200. I've got a problem with a table:
create table valores(
ejercicio decimal(2,0),
recibo decimal(7,0),
codigo_cobro decimal(1,0),
...)
fragment by expression
(codigo_cobro=0) in dbs3,
(codigo_cobro!=0) in dbs2
extent size 500000 next size 50000 lock mode row......
create unique index i_valoreskey on valores
(ejercicio,recibo,codigo_cobro)
The next sentence gives me:
QUERY:
------
select * from valores
where ejercicio=98 and recibo=34 and codigo_cobro=0
Estimated Cost: 1
Estimated # of Rows Returned: 1
1) informix.valores: INDEX PATH
(1) Index Keys: ejercicio recibo codigo_cobro (Serial, fragments: ALL)
Lower Index Filter: (informix.valores.ejercicio = 98 AND (informix.valor
es.recibo = 34 AND informix.valores.codigo_cobro = 0 ) )
I cannot eliminate any fragment. What's the problem?
Thanks in advance
Pablo F Herrero
Asturias (Spain)
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
On Tue, 12 Jan 1999 pablof@my-dejanews.com wrote:
> Hi all:
> I'm running IDS 7.30 FC5 on DEC Alpha8200. I've got a problem with a table:
> create table valores(
> ejercicio decimal(2,0),
> recibo decimal(7,0),
> codigo_cobro decimal(1,0),
> ...)
> fragment by expression
> (codigo_cobro=0) in dbs3,
> (codigo_cobro!=0) in dbs2
> extent size 500000 next size 50000 lock mode row> ......
> create unique index i_valoreskey on valores
> (ejercicio,recibo,codigo_cobro)>
> The next sentence gives me:
> QUERY:
> ------
> select * from valores
> where ejercicio=98 and recibo=34 and codigo_cobro=0>
> Estimated Cost: 1
> Estimated # of Rows Returned: 1
>
> 1) informix.valores: INDEX PATH
>
> (1) Index Keys: ejercicio recibo codigo_cobro (Serial, fragments: ALL)
> Lower Index Filter: (informix.valores.ejercicio = 98 AND (informix.valor
> es.recibo = 34 AND informix.valores.codigo_cobro = 0 ) )
>
> I cannot eliminate any fragment. What's the problem?
> Thanks in advance
>
> Pablo F Herrero
> Asturias (Spain)
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
>
Your index is built on multiple columns, you are fragmenting on one.
If the fragmented column was the first to appear in the create index statement
you would get fragment elimination. If you triggered a sequential scan, you
would also get fragment elimination.
Rob Wilson
rwilson@informix.com