CARVIEW |
Select Language
HTTP/2 200
date: Thu, 24 Jul 2025 15:48:22 GMT
content-type: text/html; charset=utf-8
cf-ray: 96448fb64fc4ea32-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=58a75e7b-4b8b-411e-9a8b-520314c2563d; expires=Fri, 24 Jul 2026 15:48:22 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-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: 4c01fcef-f7e7-4a82-bd5a-1b757835d0f7
x-worker-origin-response-time: 541000000
x-dns-prefetch-control: off
set-cookie: prov=58a75e7b-4b8b-411e-9a8b-520314c2563d; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=xF7.mxCL03ozLEBCvrGoScPeN3fLcHFUpHOBa0ppHcU-1753372102-1.0.1.1-3itLBkmRUlUa03b8YmCQjOsn.v_O54VvjBJiSsnjc5uAIDCk_5ivhi9tRgIwMiQdcMx52FPE99FNGSPfohp2fuJFXFbXz1kO61aOI9jQKOk; path=/; expires=Thu, 24-Jul-25 16:18:22 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=lc0iwGWNX8aQtUfDQ2zRT3edA4NDASg5dogtrQJLGFM-1753372102675-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
201
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
74
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
109
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
960
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
628
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
- Is it okay to email researchers if I’m just a high school student?
- Did Webster's Dictionary define Fascism by its relationship to corporations until 1987?
- What was the source of the image of pelican in Catholic churches?
- Is a diet of one third Tuna ok for an eldery cat?
- Do standing sound waves sound different?
- How to get most recent common ancestor of a set of tips using ape package in R?
- Are birth control pills classified as a carcinogenic at the same level as asbestos and tobacco?
- How to \input file as arguments?
- Why is this endgame winning for Black?
- Is the appearance of certain kinds of clouds at altitude of > 30000 feet a recent phenomenon?
- How Fill Date Series Without Formatting Using Keyboard Only
- Heavy shelves, but not a center stud
- A word that describes some people
- Expected Sum of Remaining Dice After Removing Complete Sets
- 2D Projectile Motion Diagram (Attempt)
- Why does contact with the ground make my touch-activated LED brighter?
- Can authors be blacklisted by academic publishers for multiple rejections without any ethical misconduct?
- Trinity question: what does to subsist/subsistence mean?
- What problems did Knuth have because TeX and WEB were Pascal instead of C?
- Huge Difference in Interaction P-values Between Linear vs. Ordinal Regression (0.991 vs. 0.001)
- Interaction with para hooks and footnotes
- Can you identify this shell case from Flanders?
- Mars colony book I read in the 80's. The name?
- Why is the Schrödinger wave equation totally different from the classical wave equation?