← All text tools

Database Table and Index Size Estimator

Estimate the row size, table size, index size and growth of a PostgreSQL or MySQL InnoDB table from its column types, row count, indexes and page fill.

  • Free
  • No sign-up
  • Works on any device

About Database Table and Index Size Estimator

Before a table exists you can still estimate how big it will get. List the columns with their types and the average length of variable columns, the number of rows, the primary key and the indexes. The estimator adds the per-row overhead of PostgreSQL (23-byte tuple header, alignment padding, 4-byte item pointer, 8 KiB pages) or MySQL InnoDB (record header, transaction fields, 16 KiB pages), applies the page fill, and sums the B-tree levels of every index. Example: one 4-byte integer column in PostgreSQL costs 36 bytes a row, so 1,000,000 rows need 4,425 pages, about 34.57 MiB.

How to use Database Table and Index Size Estimator

  1. Choose PostgreSQL or MySQL InnoDB, then list the columns as name, type and optionally avg N for variable-length values, or paste a CREATE TABLE statement.
  2. Enter the primary key, the extra indexes, the number of rows and the page fill percentages.
  3. Read the row size, table size and index sizes, and the projection of growth over the months you choose.

Why use this tool?

Also known as

Frequently asked questions

How accurate is the estimate?

It is a planning figure, usually within a few tens of percent for plain tables. It leaves out TOAST and off-page values, dead rows, bloat and compression, so measure a real table once you have data.

What does the page fill setting do?

It is the share of each page that holds rows. PostgreSQL tables default to 100 percent and B-tree indexes to 90 percent. Lower values leave room for updates and make the table larger.

Why do column order and types change the size in PostgreSQL?

Each value is aligned to 2, 4 or 8 bytes, so a small column between two bigints wastes padding bytes. Putting wide fixed-size columns first can shrink every row.

Is Database Table and Index Size Estimator free?

Yes. Database Table and Index Size Estimator on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.