|
Archives of the TeradataForumMessage Posted: Mon, 23 Aug 2004 @ 16:26:24 GMT
Hello, The SQL looks something like this (the whole thing is too long to post), where xx is usually a view: SELECT xx.ARTICLE, xx.otherkeys, sum(xx.facts) FROM ( SELECT a.ARTILCE, f.otherkeys, f.facts, d.week_id FROM SecurityTable SEC, FactTable f, ArticleTable a, DayTable d WHERE f.ART_NO = a.ART_NO AND SEC.DB_USER_ID = user /* Enter a fixed username here */ AND SEC.ART_NO = f.ART_NO AND d.daydate = f.daydate ) xx where xx.somequalifications group by factcols I ran this query with different users and get different explains. I also ran it using the same user and changed the 'user' system variable to different string values. Again I get different explains, depending upon the string I provide. The optimizer is obviously taking the actual value into account. I'm just wandering if this is a bug or a feature. Roland
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||