Re: Online 7.11 Select Performance - Odd Results
Posted in 1995
Clay Irving writes: |> Those two queries taking forever to run are not using the index, and |> a temp table is built for the sequential scan. <snip> Glad you got your problem solved. Just wanted to point out that a temp table is never built for sequential scans. What I think you mean is that temp space is used for the ORDER BY, since no index was available to do the ordering. Also note that the temp space is not for a TEMP TABLE per se; rather it is used for writing out sort runs (the server will attempt to do as much of the sort as possible in memory, but when memory overflows it will sort as much as it can in memory and write the temporary results out to disk. When all the source data has been sorted, those temporary files are read and merged, and the results passed back to the application.), so is really a TEMP *FILE*. The difference is really a technical nit, but I think it worth pointing out. Also note that you might speed things up further if you had multiple temp dbspaces located on different disks, then listed them all in DBSPACETEMP in your config file. This would allow temp i/o to be done in parallel when doing the sorting. Dave Kosenko Disclaimer: All opinions expressed in this message are well-reasoned and insightful; needless to say, they are not those of Informix Software, its partners or lackeys. Anyone who says otherwise is itching for a fight. **************************************************************************** "I look back with some satisfaction on what an idiot I was when I was 25, but when I do that, I'm assuming I'm no longer an idiot." - Andy Rooney