With every version of InterBase, we introduce new features that make the database experience easier for our users. When InterBase 2020 was released, we added several enhancements and a great new feature called Tablespaces.
What is an InterBase Tablespace?
A Tablespace is a type of storage location that is targeted for database objects. It allows you to group together data files in a specific storage space (location) that you choose. Tablespaces allow for better performance of the database and optimization of the server’s hardware by allowing developers and administrators to have more control over the disk layout.
A few things you should know about Tablespaces
- The page size of your database is the same page size as your tablespace.
- The maximum size of IB databases can increase from 32TB to 8160TBs using primary and 254 secondary tablespaces
- You can use tablespaces to optimize your runtime database performance.
- Your main database file(s) is/are always the primary tablespace
Setting up your Tablespaces
IBConsole
- Create your tablespace – give it a name and file location
- Assign tables to the tablespace – Open the table or index and change the tablespace location
- Check that the tables and indexes are listed in your tablespace properties
Check out the video on setting up a tablespace on a table and index in IBConsole
Command Line and ISQL
- CREATE TABLESPACE <tablespace name> FILE <‘Path/To/File/Location’>
Note: you can give the tablespace the file extension of your choosing or not use one at all.
2. Assign tables and indexes to your tablespace:
ALTER TABLE <table_name> [ALTER TABLESPACE {<tablespace_name>} ]
ALTER INDEX <index_name> <column list> [ALTER TABLESPACE {<tablespace_name>}]
3. Double-click on the tablespace you created in IBConsole and make sure that the tables and indexes you added are there or using ISQL:
SHOW TABLES IN TABLESPACE [<tablespace_name>]
SHOW INDICES IN TABLESPACE [<tablespace_name>]
Want to learn more about tablespaces in InterBase 2020?
Docwiki : Tablespace – InterBase
InterBase 2020 download : InterBase: Ultra-Fast Embeddable Database