What are the disadvantages of using VARCHAR?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
What is an EXPLAIN in DB2. How and what is the steps followed in EXPLAIN command. Can all the queries be used in EXPLAIN command to check the performance.
Where could you look if you had a question about whether a column has been defined as an index?
What is a subselect? Is it different from a nested select?
What are the various isolation levels possible?
What is the difference between drop table and delete table?
What is difference between alias and synonym in db2?
Mention some fields that are a part of sqlca.
What should be specified along with a cursor in order to continue updating process after commit?
if suppose i am having an ACCOUNT table with 3 coloumns ACC. NO,ACC. NAME,ACC. AMOUNT . If a unique index is also defined on ACC.NO and ACC.NAME then write a query to retrieve account holders records who have more than 1 ACC.
Which catalog table stores referential constraints?
Which command is used to remove all rows from a table?
What are data types?