Versions:

Getting started with TimescaleDB

Get started with TimescaleDB to experience the power of its core features, such as hypertables, continuous aggregates, and compression.

What is TimescaleDB?

TimescaleDB is an extension on top of PostgreSQL. It gives you all the power of PostgreSQL, plus new superpowers that help you work with time-series data and complex SQL queries.

About this guide

This guide helps you set up a TimescaleDB database, so you can work with some real-time stock trading data, provided by Twelve Data.

If you have any questions or concerns as you go through the tutorial, check out the Timescale community Slack and Timescale Forum, where you can find help from the Timescale community and team.

Get started with a TimescaleDB database

To work with TimescaleDB, you need a TimescaleDB database. The easiest way to get started is to use Timescale Cloud, our hosted, cloud-native database service.

Install Timescale Cloud

Install Timescale Cloud by signing up for an account. It's free for thirty days. It's a cloud service, so you don't need to download anything to your own machines.

note

Need to self-host your own database? See the other installation options in the install section.

Installing Timescale Cloud

  1. Sign up for a Timescale Cloud account with your name and email address. You do not need to provide payment details to get started. A confirmation email is sent to the email address you provide.
  2. Verify your email by clicking on the link in the email you received. Don't forget to check your spam folder in case the email ends up there.
  3. Sign in to the Timescale Cloud portal with the password you set:

important

Your Timescale Cloud trial is completely free for you to use for the first thirty days. This gives you enough time to complete all our tutorials and run a few test projects of your own.

Create your first service

A service in Timescale Cloud is a cloud instance which contains your database. Each service contains a single database, named tsdb.

Create a Timescale Cloud service

  1. Sign in to the Timescale Cloud portal.

  2. Click Create service.

  3. You can choose to build your service with or without demo data. Click Create service to continue with this tutorial.

Connect to your service

When you have a service up and running, you can connect to it from your local system using the psql command-line utility. If you've used PostgreSQL before, you might already have psql installed. If not, check out the installing psql section.

Connecting to your service from the command prompt

  1. Sign in to the Timescale Cloud portal.

  2. In the Services tab, find the service you want to connect to, and check it is marked as Running.

  3. Click the name of the service you want to connect to see the connection information. Take a note of the Service URL.

  4. Navigate to the Operations tab, and click Reset password. You can choose your own password for the service, or allow Timescale Cloud to generate a secure password for you. Take a note of your new password.

  5. On your local system, at the command prompt, connect to the service using the service URL. When you are prompted for the password, enter the password you just created:

    psql -x "postgres://[email protected]:33251/tsdb?sslmode=require"
    Password for user tsdbadmin:

    If your connection is successful, you'll see a message like this, followed by the psql prompt:

    psql (13.3, server 12.8 (Ubuntu 12.8-1.pgdg21.04+1))
    SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
    Type "help" for help.
    tsdb=>

Next steps

Now that you have a database and a way of connecting to it, you're ready to start using TimescaleDB features. In the next section, learn about hypertables and how they improve ingest and query for time-based data.

Found an issue on this page?

Report an issue!

Related Content