VARCHAR and Tag Sort

Barbara Nigh

VARCHAR and Tag Sort
Given:

CREATE TABLE TABA
COLA CHAR(2)
COLB CHAR(19)
COLC VARCHAR(240)

CREATE UNIQUE INDEX ON COLA, COLB

SELECT COLA, COLB, COLC
FROM TABA
WHERE COLA = :h
AND COLB = :h
ORDER BY COLA, COLB

Could COLC potentially cause a tag sort since it is VARCHAR? If it is not
part of the ORDER BY, will a tag sort be avoided?

When does VARCHAR cause a tag sort?



Barbara J. Nigh - CAL261
Consultant, Database Management Systems - North America
Phone: 831.754.1400 Ext. 2048
Pager: 877.406.7868
[login to unmask email]


-----------------------------------------
*******************************************************************
****
This E-mail is confidential. It may also be legally privileged. If
you
are not the addressee you may not copy, forward, disclose or use
any
part of it. If you have received this message in error, please
delete
it and all copies from your system and notify the sender
immediately
by return E-mail.

Internet communications cannot be guaranteed to be timely, secure,
error or virus-free. The sender does not accept liability for any
errors or omissions.
*******************************************************************
****

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm