About 1,560,000 results
Open links in new tab
  1. What is the difference between OFFLINE and ONLINE index …

    Dec 30, 2024 · See Online Index Operations. When the process is completed the table is locked for a brief period and the new index replaces the old index. If the index contains LOB columns, …

  2. Create a nonclustered non-unique index within the CREATE TABLE ...

    145 It is possible to create a primary key or unique index within a SQL Server CREATE TABLE statement. Is it possible to create a non-unique index within a CREATE TABLE statement?

  3. sql server - Does a foreign key automatically create an index?

    I've been told that if I foreign key two tables, that SQL Server will create something akin to an index in the child table. I have a hard time believing this to be true, but can't find much out th...

  4. sql - Why use the Where clause when creating an index? - Stack …

    Jun 23, 2019 · Create unique index IX_Contacts on Contacts(User_ID) Where (IsDefault=1) Says that, for each User_ID, they may have one, and only one, default contact in the Contacts table …

  5. sql server - Why use the INCLUDE clause when creating an index?

    CREATE INDEX idx1 ON MyTable (Col1) INCLUDE (Col2, Col3) The INCLUDE clause is new to me. Why would you use it and what guidelines would you suggest in determining whether to …

  6. How to create a really useful index in SQL Server?

    Jan 9, 2021 · In my experience, with tables of a few million rows, building an index from scratch takes no more than a few seconds, so the overhead argument is only valid if you have really …

  7. ¿Cual es la mejor práctica para crear un Index en SQL Server?

    Es importante que el índice sea por lo que más se busca. Y un detalle, en SQL Server podes tener dos tipos de índices. Clúster (Es uno solo, y debería ser el campo/campos por los que …

  8. How to add an index or primary key to a user-defined table type …

    SQL Server's CREATE TYPE DDL statement supports at least two different ways of declaring the PRIMARY KEY constraint and other options. The simplest is an inline PRIMARY KEY modifier …

  9. sql - Is it better to create an index before filling a table with data ...

    Sep 25, 2020 · 128 I have a table of about 100M rows that I am going to copy to alter, adding an index. I'm not so concerned with the time it takes to create the new table, but will the created …

  10. Function-based indexes in SQL Server - Stack Overflow

    Mar 4, 2014 · It's similar to the function based index, except you're first naming the complete expression and associating it with the table (creating a computed column), and then as a …