Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi Dodi
>SELECT * FROM tacust WHERE tacust.cmrno = ?mcmrno AND tacust.actflag = "1"
>(in the form, the user enters a customer number (into the variable mcmrno) then it requeries the view)
You can get some minor improvement by adding m. like this...
where tacust.cmrno = ?m.mcmrno
>
>CMRNO is already indexed in TACUST file.
>
>I did some research and tried different approaches. Tried using DEL tag on DELETED() but no improvement. I also tried adding ACTFLAG as index (for Rushmore optimization) but it did not help. SYS(3054,1) stated that Rushmore optimization level for table TACUST is none. I don't understand.
The fact that it's saying no optimization means there's something wrong with your indexes and/or where clauses. For example if you have an index on UPPER(cmrno) then you query with WHERE cmrno = ?m.mcmrno, that cannot optimize. You'd have to change the where clause to WHERE UPPER(cmrno) = ?m.mcmrno
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only