Returns the page size, in bytes, for the specified object.
pagesize(object_name [, index_name])
pagesize(object_id [,db_id [, index_id]])
is the object name of the page size of this function returns.
indicates the index name of the page size you want returned.
is the object ID of the page size this function returns.
is the database ID of the object.
is the index ID of the object you want returned.
Selects the page size for the title_id index in the current database.
select pagesize("title", "title_id")
The following returns the page size of the data layer for the object with object_id 1234 and the database with a db_id of 2 (the previous example defaults to the current database):
select pagesize(1234,2, null) select pagesize(1234,2) select pagesize(1234)
The following all default to the current database:
select pagesize(1234, null, 2) select pagesize(1234)
Selects the page size for the titles table (object_id 224000798) from the pubs2 database (db_id 4):
select pagesize(224000798, 4)
Returns the page size for the nonclustered index’s pages table mytable, residing in the current database:
pagesize(object_id(‘mytable’), NULL, 2)
Returns the page size for object titles_clustindex from the current database:
select pagesize("titles", "titles_clustindex")
pagesize defaults
to the data layer if you do not provide an index name or index_id (for
example, select pagesize("t1")
)
if you use the word “null” as a parameter (for
example, select pagesize("t1", null)
.
If the specified object is not an object requiring physical data storage for pages (for example, if you provide the name of a view), pagesize returns 0.
If the specified object does not exist, pagesize returns NULL.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute pagesize.
Copyright © 2005. Sybase Inc. All rights reserved. |