# How does MSSQL organize Record Data on disk in the database?

**URL:** <https://clarionhub.com/t/how-does-mssql-organize-record-data-on-disk-in-the-database/5766>\
**Category:** uncategorized\
**Created:** [December 24, 2022, 10:24pm UTC](https://clarionhub.com/t/how-does-mssql-organize-record-data-on-disk-in-the-database/5766 "2022-12-24T22:24:11Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Rick\_UpperPark](https://clarionhub.com/user_avatar/clarionhub.com/rick_upperpark/32/346_2.png) [@Rick\_UpperPark](https://clarionhub.com/u/Rick_UpperPark)\
**Post date:** [December 22, 2022, 2:12am UTC](https://clarionhub.com/t/how-does-mssql-organize-record-data-on-disk-in-the-database/5766/5 "2022-12-22T02:12:31Z")

</div>

> [@Introducing Clarion FileManager](https://clarionhub.com/t/introducing-clarion-filemanager/5760/3):
>
> I would _guess_ most SQL store records by Primary Key so SET( File:PrimaryKey ) may be most efficient

If the primary key is the clustered key, then this would be fastest. However, without using BUFFER so you reduce the number of calls to the server to return the result set, it will still be slow with a large number of rows. Using BUFFER with the file or a VIEW will greatly reduce the time required by returning a larger number of rows at a time from the server.

---

_[View the full topic](https://clarionhub.com/t/how-does-mssql-organize-record-data-on-disk-in-the-database/5766)._
