Tablespaces

class TablespaceExample(models.Model):
    name = models.CharField(max_length=30, db_index=True, db_tablespace="indexes")
    data = models.CharField(max_length=255, db_index=True)
    shortcut = models.CharField(max_length=7)
    edges = models.ManyToManyField(to="self", db_tablespace="indexes")

    class Meta:
        db_tablespace = "tables"
        indexes = [models.Index(fields=['shortcut'], db_tablespace='other_indexes')]

A common paradigm for optimizing performance in database systems is the use of tablespaces to organize disk layout.

Related concepts

Tablespaces

Tablespaces — Structure map

Clickable & Draggable!

Tablespaces — Related pages: