Help - Select returns Infinite # Rows
Posted in 1995
Topics: SQL Development & Query Writing
I am running Informix Online Server 5.01.UD2 on a Pentium PC (EISA) under
SCO Unix 3.2.4.
I am having a problem executing a SELECT while another
long transaction is running. The SELECT returns an infinite number of rows
when it should return just a few. The scenario is as follows:
1) Execute the following statements:
BEGIN WORK
INSERT INTO table1 ...
SELECT count(*) FROM table1 ...
INSERT INTO table2 ...
repeat 6 times
{
INSERT INTO table3 ...}
repeat 83 times
{
SELECT ... FROM table4 ...
UPDATE table5 ...
INSERT INTO table5 ...
INSERT INTO table3 ...}
INSERT INTO table6 ...
INSERT INTO table7 ...
INSERT INTO table7 ...
COMMIT WORK
2) While statements in 1) are executing, run this:
SELECT ...
FROM table1, table8, table9, table10
WHERE table1.key1 = table8.key1
AND table1.key2 = table9.key2
AND table1.key2 = table10.key2
When SELECT in 2) is run, it has to be interrupted or else it will continue
forever. It returns duplicate data for key fields and seems to cycle through
all possibilities for non-key items. All joins are on unique key fields.
--
Paul Stevens {stevenp@haven.ios.com}
-------------------------------------------------------------------------------
> You should be glad the telephone was not invented by Alexander Grahm Siren! <
-------------------------------------------------------------------------------