RE: Bug ? No rows returned from a view
Posted in 1998
Martin,
If this index was disabled, as in "set index ABC disabled;", at any
time, all inserts, deletes or updates, done during this time, to the
column indexed would not be added to the index but would be put in the
base table. I would recommend recreating the index and trying the query
again.
Regards,
David Ashby
-----Original Message-----
From: Martin Brassard
[mailto:martin.brassard1@sympatico.ca]
Sent: Wednesday, 9 September 1998 11:12
To: informix-list@iiug.org
Subject: Bug ? No rows returned from a view
In the folowing problem, it seems that Informix doesn't
return the same
data depending of the query plan it uses.
We issue this query et don't get any data.
SELECT a0604_bla_no,
a0612_bla_ver_no
FROM bla02 -- This is a view withthree outer join and one inner
join.
WHERE (
a0604_bla_no BETWEEN 551794 AND
551894
)
ORDER BY a0604_bla_no desc,
a0612_bla_ver_no desc;
Then, if we issue that other query that is the same, but
with a bigger
interval, we receive data that should have been returned
by the previous
query.
SELECT a0604_bla_no,
a0612_bla_ver_no
FROM bla02
WHERE (
a0604_bla_no BETWEEN 2 AND551894
)
ORDER BY a0604_bla_no desc,
a0612_bla_ver_no desc;
The query plan perform an index search on the master
table for the first
case, but a sequential scan in the second (this is ok
because the
interval covers almost all the table).
The data that covers a0604_bla_no from 551794 to 551894
and that is
returned by the second query should have been returned
by the first
one. It looks like this behavior is incorrect, and I
wonder if anybody
have face this problem before and is there workaround.
We are currently running Invormix Online 7.23.FC1 on
Digital Unix v4.0d
Alpha 4100
Help will be appreciate.
Martin
MBrassard@magrit.com