RE: FOREACH cursor sequence
Posted in 2008
The index is only clustered until the next record is inserted into the table. Then there is no guarentee that the data will be stored in a sequential order (the new record will go into the next available page, it will not reorder the table data to keep it sequential as time continues. Jarrod -----Original Message----- From: shahid.mehmood [mailto:shahid.mehmood@aku.edu] Sent: Tuesday, 29 April 2008 3:17 p.m. To: Jarrod Teale; falconsoon@gmail.com; informix-list@iiug.org Subject: RE: FOREACH cursor sequence If you have CLUSTERED INDEX (index in the ORDER that you need) on the table then you can get rows in sequence without ORDER BY clause ... -----Original Message----- From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org] On Behalf Of Jarrod Teale Sent: Monday, April 28, 2008 08:28 To: falconsoon@gmail.com; informix-list@iiug.org Subject: RE: FOREACH cursor sequence If you want to control to order, add an ORDER BY clause to the query that the cursor is running. Otherwise you have no control of the order - the rows will be returned as the database finds them. Jarrod Teale -----Original Message----- From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org] On Behalf Of falconsoon@gmail.com Sent: Monday, 28 April 2008 3:22 p.m. To: informix-list@iiug.org Subject: FOREACH cursor sequence I have a table with row 1, row 2, row 3, and etc. If I use foreach cursor to loop through the rows, will the rows been retrieved in sequence, i.e. follow row 1, row 2, row 3, and etc sequence? Or it will been retrieved without follow the original sequence, i.e. may be row 2, row 1, row 3, and etc? Thanks for anyone who can help to clarify it. Thanks. _______________________________________________ Informix-list mailing list Informix-list@iiug.org http://www.iiug.org/mailman/listinfo/informix-list _______________________________________________ Informix-list mailing list Informix-list@iiug.org http://www.iiug.org/mailman/listinfo/informix-list DISCLAIMER: This email contains confidential information and may be legally privileged. If you are not the intended recipient or have received this email in error, please notify the sender immediately and destroy this email. You may not use, disclose or copy this email or its attachments in any way. Any opinions expressed in this email are those of the author and are not necessarily those of the Fonterra Co-operative Group. http://www.fonterra.com/