473,413 Members | 1,833 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,413 software developers and data experts.

memory optimization

1
Hello,

This is my first time, so be gentle :)

Q - If I define a field to be varchar(500) but I mostly use this field as a flag,
i.e. - 1/0 & every now & then I put a long string.
what is the memory scheme? Is there memory optimization being done in the DB?
When I put just a flag value, does the rest of that field space get freed? or is it still allocated & goes to waste?

Thanks,
Avi.
Jan 23 '08 #1
1 1498
ck9663
2,878 Expert 2GB
Hello,

This is my first time, so be gentle :)

Q - If I define a field to be varchar(500) but I mostly use this field as a flag,
i.e. - 1/0 & every now & then I put a long string.
what is the memory scheme? Is there memory optimization being done in the DB?
When I put just a flag value, does the rest of that field space get freed? or is it still allocated & goes to waste?

Thanks,
Avi.
i think with varchar, it's not allocated until you use it. hence the keyword "var" vs char (only). here are some interesting read

-- ck
Jan 23 '08 #2

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

Similar topics

11
by: BCC | last post by:
Hi, I have a c++ program that creates hundreds of thousands of objects. Eventually, we would like to be able to create millions, but memory is limiting us. For example, 125,000 objects...
4
by: Evangelista Sami | last post by:
hello all i am implementing an application in which a large number of (char *) is stored into a hash table structure. As there may be collisions, each (char *) inserted into my hash table is...
7
by: Vasil Buraliev | last post by:
Hallo. I started a solution in VS.NET with template for C# windwos application. The solution has several projects: -Artifacts -BusinessRules -Client -ErrorLog -Standardization .... ... ..
3
by: Peter Olcott | last post by:
What can anyone: (1) Tell Me about (2) Provide Links to (3) Recommend Books Pertaining to Memory Performance Optimization? The main thing that I am looking for is rules-of-thumb that maximize...
6
by: paragb | last post by:
Hi, In a certain system we are left with only 6 bits, which can store a no. of range 0 to 63. We want to store two numbers each ranging from 0 to 12, which will take 4 bits each. Does anyone...
5
by: peridian | last post by:
Hello, I may be remembering incorrectly, but I'm sure that in C++ you could declare two variables of the same name where the second declaration is within it's own code block. E.g. void...
5
by: cham | last post by:
Hi, I am working on c++ in a linux system ( Fedora core 4 ), kernel version - 2.6.11-1.1369_FC4 gcc version - 4.0.0 20050519 ( Red Hat 4.0.0-8 ) In my code i am creating a vector to store...
1
by: umaramnath | last post by:
Hello everyone, I work on Linux for ARM processor for cable modem. There is a tool that I have written (as the job demands) that sends/storms customized UDP packets using raw sockets. I form the...
2
by: Rohit Kanugo | last post by:
Hi....I am writing a programm in vb.net having folders of 60,000. In a folder 10 file. When i run my application memory increases upto 678,300K. I allready used GC and disposed method.. but there...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.