Skip to content

Commit

Permalink
Update docs about indexing (#3734)
Browse files Browse the repository at this point in the history
Signed-off-by: Anastasiia Tovpeko <[email protected]>
Co-authored-by: Iain Cox <[email protected]>
Co-authored-by: Mats Kindahl <[email protected]>
  • Loading branch information
3 people authored Jan 31, 2025
1 parent 561bf4d commit 741853b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions use-timescale/schema-management/about-indexing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ Because looking up data can take a long time, especially if you have a lot of
data in your hypertable, you can use an index to speed up read operations from
non-compressed chunks (which use their [own columnar indexes][about-compression]).

You can create an index on any combination of columns, as long as you include
the `time` column, for time-series data. Which column you choose to create your
You can create an index on any combination of columns. To define an index as a `UNIQUE` or `PRIMARY KEY` index, it must include the partitioning column (this is usually the time column).

Which column you choose to create your
index on depends on what kind of data you have stored.
When you create a hypertable, set the datatype for the `time` column as
`timestamptz` and not `timestamp`.
Expand Down Expand Up @@ -97,7 +98,7 @@ different queries. Here are some examples:
SELECT * FROM devices WHERE store_id = x
```

This queries the portion of the list with a specific store_id. The index is
This queries the portion of the list with a specific `store_id`. The index is
effective for this query, but could be a bit bloated; an index on just
`store_id` would probably be more efficient.

Expand Down
3 changes: 1 addition & 2 deletions use-timescale/schema-management/indexing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ keywords: [hypertables, indexes]
# Indexing data

You can use an index on your database to speed up read operations. You can
create an index on any combination of columns, as long as you include the `time`
column, for time-series data. Timescale supports all table objects supported
create an index on any combination of columns. Timescale supports all table objects supported
within PostgreSQL, including data types, indexes, and triggers.

You can create an index using the `CREATE INDEX` command. For example, to create
Expand Down

0 comments on commit 741853b

Please sign in to comment.