ij> -- -- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License"); you may not use this file except in compliance with -- the License. You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- create a table with 5 rows, with 4K pageSize, -- this should expand over 3 pages run resource 'createTestProcedures.subsql'; ij> -- -- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License"); you may not use this file except in compliance with -- the License. You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- CREATE FUNCTION PADSTRING (DATA VARCHAR(32000), LENGTH INTEGER) RETURNS VARCHAR(32000) EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.Formatters.padString' LANGUAGE JAVA PARAMETER STYLE JAVA; 0 rows inserted/updated/deleted ij> CREATE PROCEDURE WAIT_FOR_POST_COMMIT() DYNAMIC RESULT SETS 0 LANGUAGE JAVA EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.T_Access.waitForPostCommitToFinish' PARAMETER STYLE JAVA; 0 rows inserted/updated/deleted ij> call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', '4096'); 0 rows inserted/updated/deleted ij> create table testing (a varchar(2024), b varchar(1024), c varchar(1024), d varchar(2048), e varchar(300)) ; 0 rows inserted/updated/deleted ij> call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', NULL); 0 rows inserted/updated/deleted ij> -- insert 9 rows into the table insert into testing values (PADSTRING('1',2024), PADSTRING('2',1024), PADSTRING('3',1024), PADSTRING('4',2048), PADSTRING('5',300)); 1 row inserted/updated/deleted ij> insert into testing values (PADSTRING('10',2024), PADSTRING('20',1024), PADSTRING('30',1024), PADSTRING('40',2048), PADSTRING('50',300)); 1 row inserted/updated/deleted ij> insert into testing values (PADSTRING('100',2024), PADSTRING('200',1024), PADSTRING('300',1024), PADSTRING('400',2048), PADSTRING('500',300)); 1 row inserted/updated/deleted ij> insert into testing values (PADSTRING('1000',2024), PADSTRING('2000',1024), PADSTRING('3000',1024), PADSTRING('4000',2048), PADSTRING('5000',300)); 1 row inserted/updated/deleted ij> insert into testing values (PADSTRING('10000',2024), PADSTRING('20000',1024), PADSTRING('30000',1024), PADSTRING('40000',2048), PADSTRING('50000',300)); 1 row inserted/updated/deleted ij> insert into testing values (PADSTRING('100000',2024), PADSTRING('200000',1024), PADSTRING('300000',1024), PADSTRING('400000',2048), PADSTRING('500000',300)); 1 row inserted/updated/deleted ij> insert into testing values (PADSTRING('1000000',2024), PADSTRING('2000000',1024), PADSTRING('3000000',1024), PADSTRING('4000000',2048), PADSTRING('5000000',300)); 1 row inserted/updated/deleted ij> insert into testing values (PADSTRING('10000000',2024), PADSTRING('20000000',1024), PADSTRING('30000000',1024), PADSTRING('40000000',2048), PADSTRING('50000000',300)); 1 row inserted/updated/deleted ij> insert into testing values (PADSTRING('100000000',2024), PADSTRING('200000000',1024), PADSTRING('300000000',1024), PADSTRING('400000000',2048), PADSTRING('500000000',300)); 1 row inserted/updated/deleted ij> -- select the whole row, or individual columns. -- 9 rows should be returned from each of the following selects select * from testing; A |B |C |D |E -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 &|2 &|3 &|4 &|5 & 10 &|20 &|30 &|40 &|50 & 100 &|200 &|300 &|400 &|500 & 1000 &|2000 &|3000 &|4000 &|5000 & 10000 &|20000 &|30000 &|40000 &|50000 & 100000 &|200000 &|300000 &|400000 &|500000 & 1000000 &|2000000 &|3000000 &|4000000 &|5000000 & 10000000 &|20000000 &|30000000 &|40000000 &|50000000 & 100000000 &|200000000 &|300000000 &|400000000 &|500000000 & ij> select a from testing; A -------------------------------------------------------------------------------------------------------------------------------- 1 & 10 & 100 & 1000 & 10000 & 100000 & 1000000 & 10000000 & 100000000 & ij> select b from testing; B -------------------------------------------------------------------------------------------------------------------------------- 2 & 20 & 200 & 2000 & 20000 & 200000 & 2000000 & 20000000 & 200000000 & ij> select c from testing; C -------------------------------------------------------------------------------------------------------------------------------- 3 & 30 & 300 & 3000 & 30000 & 300000 & 3000000 & 30000000 & 300000000 & ij> select d from testing; D -------------------------------------------------------------------------------------------------------------------------------- 4 & 40 & 400 & 4000 & 40000 & 400000 & 4000000 & 40000000 & 400000000 & ij> select e from testing; E -------------------------------------------------------------------------------------------------------------------------------- 5 & 50 & 500 & 5000 & 50000 & 500000 & 5000000 & 50000000 & 500000000 & ij> -- insert some partial rows. insert into testing(a) values (PADSTRING('a',2024)); 1 row inserted/updated/deleted ij> insert into testing(a,b) values (PADSTRING('a',2024), PADSTRING('b',1024)); 1 row inserted/updated/deleted ij> insert into testing(a,b,c) values (PADSTRING('a',2024), PADSTRING('b',1024) , PADSTRING('c',1024)); 1 row inserted/updated/deleted ij> insert into testing(a,b,c,d) values (PADSTRING('a',2024), PADSTRING('b',1024), PADSTRING('c',1024), PADSTRING('d',2048)); 1 row inserted/updated/deleted ij> insert into testing(a,b,c,d,e) values (PADSTRING('a',2024), PADSTRING('b',1024), PADSTRING('c',1024), PADSTRING('d',2048), PADSTRING('e',300)); 1 row inserted/updated/deleted ij> -- select some partial rows. -- should select 14 rows select * from testing; A |B |C |D |E -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- a &|NULL |NULL |NULL |NULL 1 &|2 &|3 &|4 &|5 & 10 &|20 &|30 &|40 &|50 & 100 &|200 &|300 &|400 &|500 & 1000 &|2000 &|3000 &|4000 &|5000 & 10000 &|20000 &|30000 &|40000 &|50000 & 100000 &|200000 &|300000 &|400000 &|500000 & 1000000 &|2000000 &|3000000 &|4000000 &|5000000 & 10000000 &|20000000 &|30000000 &|40000000 &|50000000 & 100000000 &|200000000 &|300000000 &|400000000 &|500000000 & a &|b &|NULL |NULL |NULL a &|b &|c &|NULL |NULL a &|b &|c &|d &|NULL a &|b &|c &|d &|e & ij> -- should select 5 rows select * from testing where a = PADSTRING('a',2024); A |B |C |D |E -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- a &|NULL |NULL |NULL |NULL a &|b &|NULL |NULL |NULL a &|b &|c &|NULL |NULL a &|b &|c &|d &|NULL a &|b &|c &|d &|e & ij> -- should select 4 rows select a,c,d from testing where b = PADSTRING('b',1024); A |C |D -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- a &|NULL |NULL a &|c &|NULL a &|c &|d & a &|c &|d & ij> -- should select 1 row select b, e from testing where e = PADSTRING('e',300); B |E ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- b &|e & ij> -- should select 14 rows select a,c,e from testing order by a; A |C |E -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 &|3 &|5 & 10 &|30 &|50 & 100 &|300 &|500 & 1000 &|3000 &|5000 & 10000 &|30000 &|50000 & 100000 &|300000 &|500000 & 1000000 &|3000000 &|5000000 & 10000000 &|30000000 &|50000000 & 100000000 &|300000000 &|500000000 & a &|c &|e & a &|c &|NULL a &|c &|NULL a &|NULL |NULL a &|NULL |NULL ij> -- update 5 rows on the main data page update testing set a = PADSTRING('aa',2024) where a = PADSTRING('a',2024); 5 rows inserted/updated/deleted ij> -- following select should return 0 rows select * from testing where a = PADSTRING('a',2024); A |B |C |D |E -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ij> -- following select should return 5 rows select * from testing where a = PADSTRING('aa',2024); A |B |C |D |E -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- aa &|NULL |NULL |NULL |NULL aa &|b &|NULL |NULL |NULL aa &|b &|c &|NULL |NULL aa &|b &|c &|d &|NULL aa &|b &|c &|d &|e & ij> -- update 3 rows on the overflow page update testing set c = PADSTRING('cc',1024) where c = PADSTRING('c',1024); 3 rows inserted/updated/deleted ij> -- following should return 0 rows select * from testing where c = PADSTRING('c',1024); A |B |C |D |E -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ij> -- followign should return 3 rows select a, b, c, d, e from testing where c = PADSTRING('cc',1024); A |B |C |D |E -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- aa &|b &|cc &|NULL |NULL aa &|b &|cc &|d &|NULL aa &|b &|cc &|d &|e & ij> -- update 1 row on second overflow page update testing set e = PADSTRING('ee',300) where e = PADSTRING('e',300); 1 row inserted/updated/deleted ij> -- following select should return 0 rows select e from testing where e = PADSTRING('e',300); E -------------------------------------------------------------------------------------------------------------------------------- ij> -- following should return 1 row select e from testing where e = PADSTRING('ee',300); E -------------------------------------------------------------------------------------------------------------------------------- ee & ij> -- update all columns for 2 rows update testing set a = PADSTRING('aaa',2024), b = PADSTRING('bbb',1024), c = PADSTRING('ccc',1024), d = PADSTRING('ddd',2048), e = PADSTRING('eee',300) where d = PADSTRING('d',2048); 2 rows inserted/updated/deleted ij> -- following select should return 0 rows select * from testing where d = PADSTRING('d',2048); A |B |C |D |E -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ij> -- following select should return 2 rows select * from testing where d = PADSTRING('ddd',2048); A |B |C |D |E -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- aaa &|bbb &|ccc &|ddd &|eee & aaa &|bbb &|ccc &|ddd &|eee & ij> -- create a table with 6 rows drop table testing; 0 rows inserted/updated/deleted ij> call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', '4096'); 0 rows inserted/updated/deleted ij> create table testing (a varchar(500), b varchar(500), c varchar(500), d varchar(500), e varchar(500), f varchar(500), g varchar(500), z varchar(3900)) ; 0 rows inserted/updated/deleted ij> call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', NULL); 0 rows inserted/updated/deleted ij> insert into testing values (PADSTRING('1',500), PADSTRING('2',500), PADSTRING('3',500), PADSTRING('4',500), PADSTRING('5',500), PADSTRING('6',500), PADSTRING('7',500), PADSTRING('1000',3900)); 1 row inserted/updated/deleted ij> insert into testing values (PADSTRING('1',500), PADSTRING('2',500), PADSTRING('3',500), PADSTRING('4',500), PADSTRING('5',500), PADSTRING('6',500), PADSTRING('7',500), PADSTRING('1000',2000)); 1 row inserted/updated/deleted ij> select * from testing; A |B |C |D |E |F |G |Z ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 &|2 &|3 &|4 &|5 &|6 &|7 &|1000 & 1 &|2 &|3 &|4 &|5 &|6 &|7 &|1000 & ij> select e from testing; E -------------------------------------------------------------------------------------------------------------------------------- 5 & 5 & ij> select g from testing; G -------------------------------------------------------------------------------------------------------------------------------- 7 & 7 & ij> select z from testing; Z -------------------------------------------------------------------------------------------------------------------------------- 1000 & 1000 & ij> -- create long rows which expand over 3 or more pages. Test that various -- qualifier work on the long row columns. drop table testing; 0 rows inserted/updated/deleted ij> call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', '4096'); 0 rows inserted/updated/deleted ij> create table testing ( key1 int, filler1 varchar(2500), filler2 varchar(2500), key2 int, filler3 varchar(2500), filler4 varchar(2500), key3 int, filler5 varchar(2400), filler6 varchar(2400), key4 int) ; 0 rows inserted/updated/deleted ij> call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', NULL); 0 rows inserted/updated/deleted ij> insert into testing values (3, PADSTRING('fill1',2500), PADSTRING('fill2',2500), 30, PADSTRING('fill3',2500), PADSTRING('fill4',2500), 300, PADSTRING('fill5',2400), PADSTRING('fill6',2400), 3000); 1 row inserted/updated/deleted ij> insert into testing values (4, PADSTRING('fill1',2500), PADSTRING('fill2',2500), 40, PADSTRING('fill3',2500), PADSTRING('fill4',2500), 400, PADSTRING('fill5',2400), PADSTRING('fill6',2400), 4000); 1 row inserted/updated/deleted ij> insert into testing values (1, PADSTRING('fill1',2500), PADSTRING('fill2',2500), 10, PADSTRING('fill3',2500), PADSTRING('fill4',2500), 100, PADSTRING('fill5',2400), PADSTRING('fill6',2400), 1000); 1 row inserted/updated/deleted ij> insert into testing values (2, PADSTRING('fill1',2500), PADSTRING('fill2',2500), 20, PADSTRING('fill3',2500), PADSTRING('fill4',2500), 200, PADSTRING('fill5',2400), PADSTRING('fill6',2400), 2000); 1 row inserted/updated/deleted ij> select * from testing; KEY1 |FILLER1 |FILLER2 |KEY2 |FILLER3 |FILLER4 |KEY3 |FILLER5 |FILLER6 |KEY4 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3 |fill1 &|fill2 &|30 |fill3 &|fill4 &|300 |fill5 &|fill6 &|3000 4 |fill1 &|fill2 &|40 |fill3 &|fill4 &|400 |fill5 &|fill6 &|4000 1 |fill1 &|fill2 &|10 |fill3 &|fill4 &|100 |fill5 &|fill6 &|1000 2 |fill1 &|fill2 &|20 |fill3 &|fill4 &|200 |fill5 &|fill6 &|2000 ij> select key2 from testing; KEY2 ----------- 30 40 10 20 ij> select key3 from testing; KEY3 ----------- 300 400 100 200 ij> select key4 from testing; KEY4 ----------- 3000 4000 1000 2000 ij> select * from testing where key1 = 1; KEY1 |FILLER1 |FILLER2 |KEY2 |FILLER3 |FILLER4 |KEY3 |FILLER5 |FILLER6 |KEY4 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 |fill1 &|fill2 &|10 |fill3 &|fill4 &|100 |fill5 &|fill6 &|1000 ij> select * from testing where key2 = 20; KEY1 |FILLER1 |FILLER2 |KEY2 |FILLER3 |FILLER4 |KEY3 |FILLER5 |FILLER6 |KEY4 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 |fill1 &|fill2 &|20 |fill3 &|fill4 &|200 |fill5 &|fill6 &|2000 ij> select * from testing where key3 = 300; KEY1 |FILLER1 |FILLER2 |KEY2 |FILLER3 |FILLER4 |KEY3 |FILLER5 |FILLER6 |KEY4 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3 |fill1 &|fill2 &|30 |fill3 &|fill4 &|300 |fill5 &|fill6 &|3000 ij> select * from testing where key4 = 4000; KEY1 |FILLER1 |FILLER2 |KEY2 |FILLER3 |FILLER4 |KEY3 |FILLER5 |FILLER6 |KEY4 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 4 |fill1 &|fill2 &|40 |fill3 &|fill4 &|400 |fill5 &|fill6 &|4000 ij> select * from testing where key1 = 1 and key2 = 10; KEY1 |FILLER1 |FILLER2 |KEY2 |FILLER3 |FILLER4 |KEY3 |FILLER5 |FILLER6 |KEY4 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 |fill1 &|fill2 &|10 |fill3 &|fill4 &|100 |fill5 &|fill6 &|1000 ij> select * from testing where key2 = 20 and key3 = 200; KEY1 |FILLER1 |FILLER2 |KEY2 |FILLER3 |FILLER4 |KEY3 |FILLER5 |FILLER6 |KEY4 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 |fill1 &|fill2 &|20 |fill3 &|fill4 &|200 |fill5 &|fill6 &|2000 ij> select * from testing where key3 = 300 and key4 = 3000; KEY1 |FILLER1 |FILLER2 |KEY2 |FILLER3 |FILLER4 |KEY3 |FILLER5 |FILLER6 |KEY4 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3 |fill1 &|fill2 &|30 |fill3 &|fill4 &|300 |fill5 &|fill6 &|3000 ij> select * from testing where key4 = 4000 and key1 = 4; KEY1 |FILLER1 |FILLER2 |KEY2 |FILLER3 |FILLER4 |KEY3 |FILLER5 |FILLER6 |KEY4 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 4 |fill1 &|fill2 &|40 |fill3 &|fill4 &|400 |fill5 &|fill6 &|4000 ij> select * from testing where key1 = 1 or key2 = 20; KEY1 |FILLER1 |FILLER2 |KEY2 |FILLER3 |FILLER4 |KEY3 |FILLER5 |FILLER6 |KEY4 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 |fill1 &|fill2 &|10 |fill3 &|fill4 &|100 |fill5 &|fill6 &|1000 2 |fill1 &|fill2 &|20 |fill3 &|fill4 &|200 |fill5 &|fill6 &|2000 ij> select * from testing where key2 = 20 or key3 = 300; KEY1 |FILLER1 |FILLER2 |KEY2 |FILLER3 |FILLER4 |KEY3 |FILLER5 |FILLER6 |KEY4 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3 |fill1 &|fill2 &|30 |fill3 &|fill4 &|300 |fill5 &|fill6 &|3000 2 |fill1 &|fill2 &|20 |fill3 &|fill4 &|200 |fill5 &|fill6 &|2000 ij> select * from testing where key3 = 300 or key4 = 4000; KEY1 |FILLER1 |FILLER2 |KEY2 |FILLER3 |FILLER4 |KEY3 |FILLER5 |FILLER6 |KEY4 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3 |fill1 &|fill2 &|30 |fill3 &|fill4 &|300 |fill5 &|fill6 &|3000 4 |fill1 &|fill2 &|40 |fill3 &|fill4 &|400 |fill5 &|fill6 &|4000 ij> select * from testing where key4 = 4000 or key1 = 1; KEY1 |FILLER1 |FILLER2 |KEY2 |FILLER3 |FILLER4 |KEY3 |FILLER5 |FILLER6 |KEY4 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 4 |fill1 &|fill2 &|40 |fill3 &|fill4 &|400 |fill5 &|fill6 &|4000 1 |fill1 &|fill2 &|10 |fill3 &|fill4 &|100 |fill5 &|fill6 &|1000 ij>