Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
atovpeko committed Jan 21, 2025
1 parent 3ad0945 commit dec2f5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 5 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,10 @@ 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 time column and the partitioning column, if you are using one.

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 +99,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 dec2f5c

Please sign in to comment.