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

What DB2 Catalog column tell you when an index needs table reorganized ?

1 Answers  


How can the firstname and the lastname from the emp table be concatenated to generate complete names?

0 Answers  


can we drop column from a table

7 Answers   INDUS,


How do you simulate the EXPLAIN of an embedded SQL statement in SPUFI/QMF? Give an example with a host variable in WHERE clause)

2 Answers  


What is phantom read in db2?

0 Answers  


I HAVE 2 TABLES ONE IS EMP_TABLE AND ANOTHER DEPT_TABLE.EMP_TABLE CONTAINS NAME,DEPTNO,DEPTNAME,LOCATION AND DEPT_TABLE CONTAINS DEPTNO,DOJ(DATE OF JOINING).I WANT TO DISPLAY NAME,DEPTNAME,DOJ AND WHO ARE JOINED BETWEN 01- JAN-2007 TO 01-JAN-2008?

6 Answers   Perot Systems,


What is Reorg Recovery? when will you run it?

2 Answers  


What is cursor stability?

1 Answers  


What does runstats do in db2?

0 Answers  


How to create backup table in db2?

0 Answers  


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

1 Answers  


What is declare cursor?

0 Answers  


Categories