Skip to main content

Questions tagged [select-into]

Questions about the SELECT INTO statement used to create a table from a SELECT statement (or store scalar results into variables in a procedural language). See also the tag [ctas].

3 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
0 answers
82 views

Double registration when using select into

SQL Server 2019 CU15, Database Audit: When auditing a SELECT on a database, everything looks fine, but if I SELECT INTO a #myTempDB, I get double registration in the AUDIT LOG. I created a test ...
Torben iisager's user avatar
3 votes
0 answers
521 views

Time to generate execution plan for select into from a view takes significantly more time than select

I have a view, vw_example, that is quite complicated and has multiple joins across multiple databases. This view has been causing significant delays when used as part of other queries, and we've ...
Simon's user avatar
  • 131
-1 votes
2 answers
1k views

How to speed up an insertion from a huge table with postgres?

I have 5 tables in my database with respectively a size of 70Gb, 500Mb, 400 Mb, 110Mb and 20 Mb. I want to create a new table that contains all columns of all tables, so I tried 2 queries, the first ...
Islacine's user avatar