Hello, all.
I wanted to create a convenient table-type for storing time
series (with possibly non-uniqe sample marks):
CREATE TYPE series_t AS TABLE
( moment DATETIME NOT NULL,
value FLOAT
)
For efficient querying and joining, I need a covering index
on the [moment] field that includes [value], but the INCLUDE
keyword does not seem to be suported:
https://learn.microsoft.com/en-us/sql/t-sql/statements/create-type-transact-sql
so that I can only create a simple non-convering column
index:
CREATE TYPE series_t AS TABLE
( moment DATETIME NOT NULL INDEX moment,
value FLOAT
)
or a compound table index for both columns:
CREATE TYPE series_t AS TABLE
( moment DATETIME NOT NULL,
value FLOAT
INDEX Main(moment, value)
)
What is best practice in cases when a covering index is
required for a tale-type?
--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)