What are the disadvantages of using VARCHAR?

Answers were Sorted based on User's Feedback



What are the disadvantages of using VARCHAR?..

Answer / s

1.Additional 2 byte length indicator is stored along with
the VARCHAR column.
2.It can potentialy affect the amount of logging when the
row with VARCHAR column is updated.
3. The placement of the VARCHAR column in a DB2 table has
performance impact. DB2 has to calculate the offset of the
the column that occurs after the VARCHAR each time the
column is accessed that increases the CPU consumption.
Atleast 5-15 instructions are executed per column.

Is This Answer Correct ?    9 Yes 0 No

What are the disadvantages of using VARCHAR?..

Answer / vinod babu

Varchar data types have to handle carefully. otherwise high
chances to get -311 error during the process.

Is This Answer Correct ?    4 Yes 2 No

What are the disadvantages of using VARCHAR?..

Answer / s

When updating VARCHAR columns, the row may not fit on the
page anymore and a pointer to the new row is left in the
orginal space. Over time, there will be more relocated rows
that degrades performance.

Is This Answer Correct ?    6 Yes 6 No

Post New Answer

More DB2 Interview Questions

Is DECLARE TABLE in DCLGEN necessary? Why it used?

3 Answers  


Hi , I am posting some interview ques . what is the use of cursors ? what is the diff between select and cursor ? bith are used for data retrival .. rite?

2 Answers   Deloitte,


What is ibm db2 used for?

0 Answers  


How to find the number of rows in db2 tables?

0 Answers  


What if we try to insert the base table through updatable view , but failed to give a column value which is defined as NOT NULL.

1 Answers   Cap Gemini,






Why db2 is called db2?

0 Answers  


Where besides the DB2 catalog is database object information stored by DB2?

1 Answers  


select distinct(empid),distinct(dept),name from EMP will the above query work?

2 Answers   CTS,


What is isolation level?

4 Answers  


what is check point and restart Logic ? why do we go for that ??

2 Answers   CGI, UST, Xansa,


Usually, which is more important for DB2 system performance - CPU processing or I/O access?

1 Answers  


What is DCLGEN ?

2 Answers  


Categories