SQL temp tables can be used to enhance stored procedures performance by shortening the transaction time, allowing you to prepare records that you will modify in the SQL Server temp table, then open a transaction and perform the changes.
Las tablas temporales pueden ser usadas para mejorar los procedimientos almacenados al acortar el tiempo de transacción, permitiéndole preparar los registros que usted modificará en la tabla temporal, luego abrir una transacción y realizar los cambios.
Also, not every SQL Server temp table needs adding indexes, as it depends on many things such as the way that this SQL temp table will be called, joined with other huge tables or if it will be part of a complex stored procedure.
También, no toda tabla temporal necesita añadir índices, ya que eso depende de muchas cosas, como la manera que esta tabla temporal será llamada, combinada con otras tablas enormes o si será parte de un procedimiento almacenado complejo.
a Local SQL Server temp table, which is named starting with a symbol (e.g. #TempShipments), that can be referenced only by the current database session and discarded by its disconnection,
Una tabla Temporal Local la cual es nombrada comenzando con un símbolo (por ejemplo, #TempShipments), y puede ser referenciada solo por la sesión actual de la base de datos y descartada por su desconexión.
The SQL Server Database Engine can distinguish between the same SQL temporary tables created while executing the same stored procedure many times simultaneously by appending a system-generated numeric suffix to the SQL Server temp table name.
El Motor de Base de Datos de SQL Server puede distinguir entre las mismas tablas temporales creadas mientras que ejecuta el mismo procedimiento almacenado muchas veces simultáneamente anexando un sufijo numérico generado por el sistema al nombre de la tabla temporal.
a Persistent SQL Server temp table which is named starting with a TempDB prefix such as TempDB.DBO.TempShipments
Una tabla Temporal Persistente la cual es nombrada comenzando con un prefijo TempDB como TempDB.DBO.TempShipments.
Or you don't have permissions to create a table in the existing database, you can create a SQL Server temp table that you can manipulate.
O no tiene los permisos para crear una tabla en la base de datos existente, puede tratar de crear una tabla temporal de SQL Server que pueda manipular.
In addition to that, SQL Server column level statistics are generated automatically against SQL temp tables, helping the SQL Server Query Optimizer to generate the best execution plan, gaining the best performance when querying that SQL Server temp table.
En adición a eso, las estadísticas a nivel de columna de SQL Server son generadas automáticamente contra las tablas temporales, ayudando al Optimizador de Consultas de SQL Server a generar el mejor plan de ejecución, obteniendo el mejor desempeño cuando se consulta a una tabla temporal.