Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] FROM - TO vs. GE and LE

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] FROM - TO vs. GE and LE
 Login/Join
 
Platinum Member
posted
Which is more efficient as far as processing required:

WHERE FIELD FROM value TO value

- OR -

WHERE FIELD GE value
WHERE FIELD LE value

Thank you,

John

This message has been edited. Last edited by: JohnB,


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Expert
posted Hide Post
If you're reading a DBMS table, then the SQL generated is exactly the same. For example, reading a DB2 table with the two different filters, FROM-TO GE-LE generates the same SQL:

SELECT T1."TIME_DIM_KEY" FROM BASEL.TIME_D T1 WHERE
 (T1."TIME_DIM_KEY" BETWEEN 37540 AND 37542) FOR FETCH ONLY;


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Efficiency is usually relative to the database. The best way to test what is most efficient is to generate an SQL trace to see the SQL that is generated by each and then use some DBMS tool (or your local DBA) to tell you which is more efficient for the DB you use. I would venture a guess that there would be no difference between the two for most DBs.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
I agree... I have not, yet, seen a difference in performance using either of the above mentioned methods. I, personally, prefer to code the "FROM this TO that". Just remember that it's inclusive (GE ... LE)
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
One thing that I would caution you on when using either method against RDBMS fields that have a date-time format (HYYMDs etc.) where you have them respecified in the MAS as USAGE=YYMD, ACTUAL=DATE is that the SQL produced extends the variable of the form YYMD to HYYMDs and appends 00:00:00 as the time element. This causes any field value with a real time value to be omitted from the selection. For example -
In MAS -
FIELD Date_Time_Value, ALIAS=Date_Time_Value, USAGE=HYYMDs, ACTUAL=HYYMDs, $
FIELD Date_Value,      ALIAS=Date_Time_Value, USAGE=YYMD, ACTUAL=DATE, $
Rec Date_Time_Value
 1  2009/01/01 00:00:00
 2  2009/01/01 10:01:25
 3  2009/01/01 20:01:25
 4  2009/01/02 00:00:00
 5  2009/01/02 10:01:25
 6  2009/01/02 20:01:25

WHERE Date_Value FROM '2009/01/01' TO '2009/01/02'

will return records 1 thru 4 but will not return 5 or 6.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] FROM - TO vs. GE and LE

Copyright © 1996-2020 Information Builders