Timescale Cloud: Performance, Scale, Enterprise
Self-hosted products
MST
You can migrate data into a TimescaleDB hypertable from a regular PostgreSQL table. This method assumes that you have TimescaleDB set up in the same database instance as your existing table.
Before beginning, make sure you have installed and set up TimescaleDB.
You also need a table with existing data. In this example, the source table is
named old_table
. Replace the table name with your actual table name. The
example also names the destination table new_table
, but you might want to use
a more descriptive name.
Migrate your data into TimescaleDB from within the same database.
Call CREATE TABLE to make a new table based on your existing table.
You can create your indexes at the same time, so you don't have to recreate them manually. Or you can create the table without indexes, which makes data migration faster.
If you are self-hosting TimescaleDB v2.19.3 and below, create a PostgreSQL relational table
, then convert it using create_hypertable. You then enable hypercore with a call to ALTER TABLE.
Insert data from the old table to the new table.
INSERT INTO new_tableSELECT * FROM old_table;If you created your new table without indexes, recreate your indexes now.
Keywords
Found an issue on this page?Report an issue or Edit this page
in GitHub.