# Limits
Two of AgensGraph's limits come from the identity it gives every vertex and edge. The rest
are PostgreSQL's, because a graph is a schema and a label is a table.
## Graph limits
Every vertex and edge carries an identity of type `graphid`, and its layout sets the two
limits a graph can reach. A `graphid` is a 64-bit unsigned integer split in two. The top 16
bits are the **label id**, and the low 48 bits are the **local id**, the row's serial number
within its label. An identity therefore prints as two numbers. `movie[3.7]` is label 3,
row 7.
| Limit | Value | Comes from |
| --- | --- | --- |
| Labels per graph | 65,535 | The 16-bit label id. Zero is reserved as the invalid label id, so the usable range is 1 to 65,535. |
| Rows per label | 281,474,976,710,655 | The 48-bit local id: 248 − 1. |
| Label name length | 63 bytes | PostgreSQL's identifier length. |
A graph itself has no separate limit: a graph is a schema, and PostgreSQL sets no limit on
schemas per database. A large number of graphs consumes relations, since every graph creates
a sequence and two root labels of its own.
Both halves of a `graphid` are range-checked. The constructor refuses either one out of
range:
```sql
SELECT graphid(65536, 1);
```
```
ERROR: labid out of range: 65536
```
```sql
SELECT graphid(1, 281474976710656);
```
```
ERROR: locid out of range: 281474976710656
```
The same two messages, without the offending value, come back when a `graphid` literal is
parsed: `SELECT '65536.1'::graphid` raises `labid out of range`.
The counters that hand out these numbers are ordinary sequences, so you can inspect them.
Each graph has one `ag_label_seq` for label ids and each label an `