General information
Title:
SELECT Optimization BUG or Limit ?
Hi all
CREATE CURSOR ctop (dato I)
INSERT INTO ctop values(1)
INSERT INTO ctop values(2)
INSERT INTO ctop values(1)
INSERT INTO ctop values(2)
z=6
SELECT *,m.z Z from ctop WHERE m.z>1 AND cycle()
* 6-5-4 are used for the analysis of the select
* RESULTS
* 1 3
* 2 2
* 3 1
z=1
SELECT *,m.z Z from ctop WHERE cycle() AND m.z>1
* analysis of the select optimize WHERE :
* m.z is a variable, then it is costant !!!!
* m.z>1 is costant and false, then WHERE is costant and false
* WHERE is costant and false -> none results
* RESULTS
* none
* idem for Object.properties
* good optimization is for litteral expression
* this bad optimization not exist in MSQL
* where is document this beaviour ?
* the master optimization rule is:
* no optimizer algorithm is perfect,
* therefore I must be able to disable it.
* THE BIG PROBLEM IS : I CANNOT DISABLE SELECT OPTIMIZER !!!!
PROCEDURE cycle
z=z-1
ENDPROC
Fabio
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