CARVIEW |
Select Language
HTTP/2 200
date: Wed, 23 Jul 2025 13:05:52 GMT
content-type: text/html; charset=utf-8
cf-ray: 963b64478850165e-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=ada01cce-b048-4373-9ed6-7bd1dd3d96e7; expires=Thu, 23 Jul 2026 13:05:51 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-frame-options: SAMEORIGIN
x-request-guid: 04d7a8f1-16e4-4bbd-9922-96095885b400
x-worker-origin-response-time: 1070000000
x-dns-prefetch-control: off
set-cookie: prov=ada01cce-b048-4373-9ed6-7bd1dd3d96e7; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=9O1AR6vkdVGma1QprWRRRVxLA14xJtuBAVX4id7cL8I-1753275952-1.0.1.1-Ho6Pocah.Eqj47rM4V5KLD6aXHs72sj4Mb.bjbkELTgeC0NtUKtrKkVan.sb3Zjuqgi47AjpsqOAp6cyxP8SqLMQQjOK.Fthibj3aNIhglU; path=/; expires=Wed, 23-Jul-25 13:35:52 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=l2IjVekzREZcyhnpxBnM19fBcl0VmWV51Hh5ZIuKINs-1753275952371-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'temporary-tables' Questions - Database Administrators Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [temporary-tables]
The use of temporary table objects (not table variables) including semantics, design, performance optimization, and indexing. See also [table-variable].
297 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
7
votes
1
answer
198
views
SQL Server deadlock on temp tables in different connections
I'm getting occasional deadlocks on temp tables in two different connections (at least as far as I can tell, the deadlock graph shows different spids). The deadlock graph (lightly redacted, and with ...
1
vote
1
answer
73
views
Is pg_attribute bloat from temp table creation still a potential issue in modern versions of PostgreSQL?
I am not an expert in PostgreSQL, however I recently ran across some PostgreSQL code during a code review which creates and drops temporary tables in a manner that seems consistent with the typical ...
0
votes
0
answers
30
views
Is there a limit to how many temporary tables MySQL can handle?
I manage a web service. The service has multiple endpoints, and most of these endpoints simply return some data representing an entity (such as a track, genre or composer). Each endpoint usually ...
-1
votes
1
answer
108
views
OBJECT_ID fails to find existing temp table [closed]
I'm using temp tables to stage data before inserting into production. As a couple of things use them, before anything else I do a:
IF OBJECT_ID(N'##Projects_TEMP') IS NOT NULL
TRUNCATE TABLE ##...
15
votes
1
answer
745
views
What could cause a SQL Server non-cached temporary table to NOT trigger a recompile when a large amount of rows have changed?
I have observed (and reproduced) the following scenario with SQL Server 2022.
The pattern in use
code is executed via sp_executesql (no stored procedure is involved)
The first query selects data into ...
0
votes
0
answers
41
views
Temporary relation files not removed after sessions ends - Single PostgreSQL instance PostgreSQL 13
We are facing default temporary tablespace disk space full issue due to lots of below temporary relations files created but not removed after ending session
1.1G t756_1536213694.409
1.1G ...
2
votes
1
answer
183
views
What kinds of operations could cause a "Temp table changed" recompilation?
Frequent recompilation happens in one SP with 'Temp table changed' cause. What kinds of operations on temp table would trigger this? There are no alter and create index operations on temp table, just ...
6
votes
1
answer
958
views
How does sp_executesql interact with temporary tables?
I'm at a loss as to why some SQL leveraging sp_executesql is working the way it is when temporary tables are involved, along with INSERT and SELECT - INTO. I'm using SQL Server.
Here is the code in ...
0
votes
1
answer
197
views
DFT drops connection and its temporary table after leaving any DFT item, tested with two Script Components. How do I keep the temp table alive?
Links
This takes up:
Using temporary tables in SSIS flow fails - Stack Overflow
Is it possible to use a temp table in a data flow source?; answer is:
'No', since it cannot be passed without being ...
0
votes
2
answers
1k
views
How do I create and fill a temporary table with incoming data from a Data Source item without leaving the SSIS Data Flow Task C# Script Component?
I came to ask this question after coding in a script component for some time, testing mainly how to loop over columns of the Row object, see Looping Through Columns in SSIS Script Component - Stack ...
0
votes
0
answers
61
views
Do Primary Keys On Table Variables Have No Statistics At All? [duplicate]
My confusion is down to an apparent contradiction in principles. Primary keys are indexes and those always have statistics, but table variables notoriously always don't have statistics. What follows ...
0
votes
1
answer
626
views
Why use a memory-optimized table variable instead of a temp table or normal table variable?
Table variables have a bad reputation, mostly due to cardinality estimates. However, this reputation was earned before the introduction of memory-optimized table variables. Microsoft covers some use-...
0
votes
1
answer
278
views
Switching table partition into temporary table
I'm trying to switch a table partition into a temporary table with the following query:
create partition function [PFCT_T](datetime2) as range right for values ()
create partition scheme [PSCH_T] as ...
-1
votes
1
answer
105
views
Is it possible to create fast (ram only) temporary table for inter software communication purposes in MS SQL Server?
I was wondering that is it possible to create a table that is really fast and temporary (basically one that resides in ram) in MS SQL Server 2005 or later for inter software communication purposes? Do ...
2
votes
1
answer
3k
views
Is there any benefit to WITH RECOMPILE or OPTION (RECOMPILE) in a stored procedure that uses temp tables at every stage?
Suppose that I have a stored procedure. It does not call any other stored procedures and is not called by any others, nor is it called concurrently. Every step in this stored procedure either creates ...
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
sql-server × 130
mysql × 76
postgresql × 36
stored-procedures × 30
performance × 25
t-sql × 25
tempdb × 16
optimization × 14
sql-server-2016 × 14
innodb × 13
oracle × 12
query-performance × 12
sql-server-2014 × 12
cte × 10
index × 10
mariadb × 10
sql-server-2008 × 9
dynamic-sql × 8
sql-server-2005 × 8
mysql-5.6 × 7
table-variable × 7
execution-plan × 6
memory × 6
sql-server-2012 × 6
more related tags
Hot Network Questions
- How to 'scale' a square list?
- Which PowerShell commands are automatically scrubbed from Get-History?
- Dystopian 80s sci-fi movie about the USA choosing mediocrity
- Black color in Decal is not visible
- What are these pastries pictured in the "Austria" article in the World Book Encyclopedia?
- What is the consistency strength of Russell & Whitehead's ‘Principia Mathematica’?
- A soviet sci-fi novel (novelette?) with frogs?
- When you view a historical event with an incorrect modern lens
- Why were two 2x6 boards installed on top of a window rough sill?
- SOSL/SOQL isn't returning User records
- Can you identify this shell case from Flanders?
- Make a Mulenère encryption program
- Is it better to nest figure environments inside proof environments, or leave them separate?
- Fit text on TWO pages by varying font size automatically
- Why is my gooseberry jam so stiff?
- Console-based Casino Game in C++
- Can I still get the pacifist ending if I use the fight option in a boss fight, but miss every time?
- Create a custom filter in WordPress extensions page
- In QGIS installed via OSGeo4W on Windows 11, what is the path to the command history file for the Python console?
- OId Movie about an alien city that plays a repeating melody
- Manga/manhwa where protagonist is the only one summoned to a different other world
- Must hospitals care for unidentifiable individuals indefinitely?
- What was the source of the image of pelican in Catholic churches?
- Is there a formal threshold for when a variable is considered 'random' in statistics? What is it?