Re: insert from select (table scan) with no join
Posted in 2005
some suggestions: 1) problem in the select - did you try to set sqlexplain on? did you notes any differences between them (slowly/fast)? - could be that someone is locking some pages in exlusive mode and when you are trying to read the table you have to wait that the previous operation finish? 2) problem in the insert - could be that someone is locking the table in exlusive mode and when you are trying to insert the data you have to wait that the previous operation finish? do you use the set lock mode to wait? - could be that someone is executing a lot of operation on the disk? in this case you are losing time to access the disk. check it. 3) what about the ammount of operations in the instance? if there are a lot of users, all the system is going slowly. check the CPU. Memory, access to the disk. 4) could be that when it is going fast is because all the pages are in the buffer and none has been modified so informix doesn't need to read the disk? a recently select on the same table could giustify it.