Re: Order of rows in temp tables
Posted in 1998
Martin Brassard wrote: [SNIP] > My question is : Can we assume that the rows of the temp table will > always be returned in the physical order of the table if we don`t > spedify an order by clause in our query. > > What makes me hesitate to implement this is that I think that the clause > "order by" with "into temp" was a invalid syntax in earlier version of > Informix. I just tried it and the data from the temp table (1660 rows) was sorted in batches. Also in 7.30+ temp tables are created as fragmented tables across all tempspaces and loaded round robin so the return order would depend on several factors including PDQPRIORITY. It is best to include an ORDER BY clause WHEN EVER you want data in a particular order. Art S. Kagel