Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2003
    Posts
    223

    Unanswered: How many pages in a table?

    Hello, everyone:

    How to calculate or estimate the pages or a table? I always heard someone said their databases have many pages increase one day. What does it mean?

    Thanks

    ZYT

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    what does "page" mean? i have heard of databases, tablespaces, and tables, but not pages

    can you give more information?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Look at sp_spaceused
    It converts pages to KB.
    Just take that part out and you should have what you asked for

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    R937: Pages are part of the physical implementation of Microsoft SQL Server (and also of Sybase). While this isn't absolutely correct, you can think of pages as the database engine's "atomic unit" of storage.

    Yitongzhang: Calculating the pages used by a table is a slippery kind of thing because it gets pretty far down into how the SQL engine stores data. There are several kinds of pages, some used for data, some for indicies, some for blobs (TEXT and IMAGE columns), and some for log space. Until you really understand how these pages are used, it doesn't make much sense to just count them directly...

    Using the sp_spaceused procedure gives you a commonly accepted way to measure table size. You could also study Inside SQL Server for more details on how tables are stored, and what pages are important for your own purposes and measurements.

    -PatP

  5. #5
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    thanks, pat, that does sort of ring a bell now

    (by the way, and i realize this is really minor, but the handle is r937, not R937, thanks)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  6. #6
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    Quote Originally Posted by r937
    thanks, pat, that does sort of ring a bell now

    (by the way, and i realize this is really minor, but the handle is r937, not R937, thanks)
    sql server is not case sensitive by default.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •