Tuesday, March 27, 2012

Adding a new field to a table with image field

Hi,

I have a concern about adding a new field to a table with image field - which is huge.

Will there be a problem with some databases, where they have a hard time locating data correctly after such a large field?

Previously this happened to me, and what was advised to put all the big fields at the end of the table.

Thanks.

I have not heard of such impact caused by the order of columns. When SQL search table to locate a row, it either uses table scan (when no index exists on the table) from the IAM page, or utilize indexes (clusetered/nonclustered) if there is any on the table. To learn more about table structuer, you can refer to:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da2_8sit.asp

I recommend you to read <Programming a Microsoft® SQL Server™ 2000 Database> if you're interesting in this, which includes a topic "How SQL Server Retrieves Stored Data".

No comments:

Post a Comment