Estimating the procedure cache size for a sort

To find the size of the procedure cache used for a sort (used by create index, update statistics, order by,distinct, sort and merge join), first determine the number of rows per page:

Image consists of this formula: Rows per page equals the page size divided by the minimum length of row.

Determine the procedure cache size used for a sort with this formula:

Image consists of two forumulas: Procedure cache size = number of sort buffers times rows per page times 85 bytes.

NoteIf you use a 64-bit system, use 100 bytes in this formula.