Smallint takes up 2 bytes and char(1) takes up 1 byte. Maybe char(1)
would be better. Write a query using both and see what the outcomes
are?
Please take a few minutes to provide feedback on the quality of service you received from our staff. The Department of Education values your feedback as a customer. Commissioner of Education Jeanine Blomberg is committed to continuously assessing and improving the level and quality of services provided to you.Simply use the link below. Thank you in advance for completing the survey.
http://data.fldoe.org/cs/default.cfm?staff=Ed.[Email address protected]
-----Original Message-----
From: Steven Cary
[mailto:db2udbdba-ezmlmshield-x72700732.[Email address protected]
Sent: Tuesday, May 22, 2007 1:58 PM
To: LazyDBA Discussion
Subject: Query-efficiency of DB2 Boolean Options
I understand that boolean values can be represented in db2 using either
a
SMALLINT or CHAR(1) data type.
-- Is one option better from a query-efficiency/computational-efficiency
perspective?
-- If so, how much better (in percentage or just general order of
magnitude terms)?
What situations are there, if any, in which the answers to these two
questions differ?
Best regards,
Steve Cary
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DB2 & UDB email list listserv db2-l LazyDBA home page