473,387 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Adding varchar of 32k

1
I have a need to add a varchar column of 32k size in addition to an existing varchar column of similar size in the same table.
I want to know, how would it impact the overall performance of the application accessing the table for select/update/insert?

Additional Info:
I am currently using DB2 UDB v8
Columns are used to store XML data
I do not want to use CLOB/BLOB, since I cannot afford a performance impact

Thanks,
Prk1
May 6 '08 #1
2 2693
For select statements it will have quite normal performance as have selecting from standard tables

For insert - it depends on the method and task - if there will be the possibility to count the column, it will be the best
If not, then it depends on what you need to store in the table - if you would like to add a column to the table with existing data, do not use the import/insert update command because it will take serious time .... better will be to use load command an load it to pre-made table and set up trigger fixed to a fictive import (you can load huge table and data in short time and setup the trigger after the import to another table) which will count the column for you
Or, you can export the two tables with export to ..... select and joined statement and then load to newly created table

update - as insert in fact .)
May 12 '08 #2
prk1,
Ah. A common problem and one I've been benchmarking for a customer at the moment. First up you cannot have a row span a page and biggest supported pagesize is 32K. Therefore you cannot have two VARCHAR(32K) columns in the same table.

Options are:
  • LONG VARCHAR - these are stored outside the table row and these you can have more than one in a table but watch the restrictions
  • CLOB - Also stored outside the table.
  • XML - (with V9). Also kept outside the table.

Of these LONG VARCHAR and CLOB have similar performance impacts (50% elapsed and CPU) with XML having the most impact (100% elasped, 12 times more CPU).

Naturally these results are very dependent on how you use the data, but the relative impacts may be of interest.
May 15 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Yannick Turgeon | last post by:
Hello all, I'm using SS2K on W2k. I'v got a table say, humm, "Orders" with two fields in the PK: OrderDate and CustomerID. I would like to add an "ID" column which would be auto-increment...
1
by: tshad | last post by:
I have changed my code from a straight string for my Sql to Parameters and can't seem to get it to work. I have the following excerpts from my code: ...
2
by: tshad | last post by:
When I normally set up my Sql statements and parameters, I would normally do: Dim objCmd as New SqlCommand("AddNewResumeCoverTemplate",objConn) objCmd.CommandType = CommandType.StoredProcedure...
20
by: Bryan | last post by:
hello all... im trying to add a record to an sql db on ms sql server 2000, using vb.net. seems to be working.. except for one thing, one of the columns in the database is a bit datatype, and...
1
by: bennett | last post by:
I have a table with about 100,000 records whose description is: +-----------------------+----------------------+------+-----+---------+----------------+ | Field | Type ...
1
by: Rich | last post by:
Hello, I can update a dataset from my client app using a dataAdapter.Updatecommand when I add parameter values outside of the param declaration. But If I add the param values inline with the...
7
by: Miro | last post by:
Im a VB Newbie so I hope I'm going about this in the right direction. I have a simple DB that has 1 Table called DBVersion and in that table the column is CurVersion ( String ) Im trying to...
3
by: Metalzed | last post by:
Hi I want to have a log so in my table i got a TEXT field called LOGG. I want to update this field with new data by adding more text to field. I am using MS SQL 'test' + 'test' doesn't...
2
by: mdfayazi | last post by:
I am using dataadapter to Add,Update,Delete rows in a datagridview.Update and delete are working but while adding a rows the problem comes.When I add more than one row only first row values are...
3
by: Shestine | last post by:
I am trying to add a column to a current table, with data in it. I am only learning, and i have no idea how to change this to make it work. Here is the script I have right now it, but what it does is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.