473,796 Members | 2,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL server 7 physical storage

I need to bulk insert very large amount of data into several MSSQL
tables.
The first Data model definition used identities to mantain relationship
between those tables but we found that natural keys (compound) are
better for
bulk insert (there is no need to obtain the identity first)

My question is, changing the identities to natural keys (in some tables
in
order of 4, 5 attributes) will enlarge my database storage?

I think MSSQL implements relationships with pointers (or hashcodes), so
the
storage size will be similar, right?

Regards,

Jul 23 '05 #1
3 1339

"Pablo Wolfus" <pw*****@gmail. com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
I need to bulk insert very large amount of data into several MSSQL
tables.
The first Data model definition used identities to mantain relationship
between those tables but we found that natural keys (compound) are
better for
bulk insert (there is no need to obtain the identity first)

My question is, changing the identities to natural keys (in some tables
in
order of 4, 5 attributes) will enlarge my database storage?

I think MSSQL implements relationships with pointers (or hashcodes), so
the
storage size will be similar, right?

Regards,


It probably depends on where you have your indexes, and particularly your
clustered index. If it used to be on the artificial key but is now on the
natural key, then it will be bigger - the table data is still in the leaf
level, but the size of the non-leaf levels will have increased. Of course,
if you remove the existing IDENTITY columns, then you'll save some space
there (4 bytes per row, assuming it's integer type, plus the index). But you
seem to be saying that you've made this change already, so presumably you
can just check the table sizes directly?

Even if the table size does increase noticeably, since disks are so cheap
compared to other system components, it's worth using more space if it gives
you a cleaner data model and better performance.

Simon
Jul 23 '05 #2
First of all, thanks for your quick response.

I am at design phase now, so i can't test the impact of this changes.
The modification i'm trying to apply is to the design data model
specification.

I didn´t understand what you meant with "the table data is still in
the leaf level". I know there will be a slight growth if i use natural
keys (due to references) but i need to measure this growth, that is, i
need to know if -fisically- the FK consisting of several data columns
(resident in another master table) is stored in both tables.

If the answer is true, what is the sense that those columns data are
duplicated?

Regards,

Jul 23 '05 #3
Pablo Wolfus (pw*****@gmail. com) writes:
I didn´t understand what you meant with "the table data is still in
the leaf level".
Simon was talking about a clustered index. In a clustered index, the
data is in the leaf level of the index.
I know there will be a slight growth if i use natural
keys (due to references) but i need to measure this growth, that is, i
need to know if -fisically- the FK consisting of several data columns
(resident in another master table) is stored in both tables.
Yes, they are.
If the answer is true, what is the sense that those columns data are
duplicated?


That is a question that can lead into an answer of quite a philosophical
nature. But I let it suffice to point out two things:

1) Simplicity. Having each table in a space of its own, makes the design
of the storeage engine considerably simpler. And that pays back to
users with improved performance and stability.
2) Conserving space is not all. Sometimes, using more space can improve
performance. Consider:

SELECT * FROM tbl_with_many_f oriegn_keys

Assumed that SQL Server did not duplicate the FK columns in this
table. Then this query would have to access the data pages of
the referred tables, and this could be very costly.

As for the design question, using artificial keys for relations can
sometimes be useful when the number of columns gets difficult to manage.
But adding an artificial key can also make queries much more complex.
The space consumption is only one aspect of it all. Ease of development
and performance are others.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1724
by: Cherrish Vaidiyan | last post by:
Hello, Thank you for replying to my previous doubts. I have a query regarding Shared Storage. Here is my strategy. I have two system with 20 GB HDD running on Windows 2000 Server and an external storage 200GB. The external storage is partitioned into two 100 GB partition. I want to keep only the Oracle 9i database in one of the 100GB of the external storage. The external HDD is made to have no Operating System
2
15230
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000 Personal disk from the SQL Server 2000 Enterprise kit as this is reported here on the MSDN web site to be the version that is supported on Windows XP. In fact so many of you kind people confess to having succeeded in doing it. I have tried...
1
563
by: David Fitzjarrell | last post by:
omlet@omlet.org wrote in message news:<dc6c1ff0.0406300739.5001ae2a@posting.google.com>... > fitzjarrell@cox.net (David Fitzjarrell) wrote in message news:<9711ade0.0406292055.4bfaa4fe@posting.google.com>... > > omlet@omlet.org wrote in message news:<dc6c1ff0.0406291431.ef3d9f8@posting.google.com>... > > > joel-garry@home.com (Joel Garry) wrote in message > > > > > > > > "In general, if recursive calls is greater than 4 per process, the >...
0
1453
by: chris6995 | last post by:
I'm looking for a way to programatically query for the association between a physical device (i.e. removable USB storage) and it's logical drive letter. I've gone through Win32_LogicalDisk, Win32_DiskDrive, Win32_PhysicalMedia in system.management... I've also run through WM_DEVICECHANGE and the device types under DEV_BROADCAST_HDR. I can't find anything that gives me the logical drive letter mapping for physical device/drive - in this...
0
1804
by: Cindy B | last post by:
Please send your resume and position to Cindy@AtlanticResource.com! I CAN NOT accept candidates that ARE OUTSIDE OF THE US! NO PHONE CALLS PLEASE! Email your resume to me! Position:SQL SERVER/PEOPLESOFT DBA Date: 03/07/05 Location: Richmond, VA Duration: 5 month conract to hire Salary: 65,000-80,000K Contract to Hire 5 months
0
1761
by: tiacux | last post by:
Tech Associates is recruiting for: A SQL Server Database Systems Administrator for Jacksonville, Florida. Salary to $75,000. Description The Database Systems Administrator's role is to direct, evaluate, review, and manage database resources and services across the organization while ensuring high levels of performance and availability. This individual is also responsible for developing,
2
3829
by: gdabbara | last post by:
Hi, We have a situation where we want to move our current database server to a different hardware and rename the server. If we change the Physical server name, do we have to go thru the whole process of changing it in sql server by running sp_dropserver, sp_addserver? Can we have an alias for the server name in DNS and can sql server resolve the server name internally by going thru DNS? For eg: Our current database server name is...
4
6597
by: Prince Kumar | last post by:
I joined a company recently and they have a java program which hangs (does nothing) after a while. This is no way consistent. It could succeed quite a few times and can fail a few other times. There is no consistency when it fails. Could anyone here shed some light on how to debug/resolve the issue. I guess IBM looked at the issue and were not able to pinpoint where the issue is. When the program hangs and when force the DB2...
0
1875
by: lknight643 | last post by:
I have an asp.net application that works with a SQL server database on server No. 1 but I want to upload files for storage to Server No. 2 that is accessible only from the Internet. If the file storage was on server No. 1, I would specify a physical file path (ChosenDirectory) for storage of the uploaded file but in my case I need to specify a virtual path like http://server2/folder1/. I'm trying to use server.mappath to convert the...
0
9685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9535
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10467
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9061
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7558
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6802
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5454
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.