How to get a list of global temporary tables in the current database?
I am trying to get a list of the global temporary tables that are currently active. There seems to be an issue with them bumping in to each other (same name). As the ‘acting’ dba, trying to sort out a...
View ArticleDisplay month in columns and the sum of sales below the columns in sql [closed]
My result is this: Sitecode Month Amount -------- ----- ------ XX Jan 1000 XX Jan 3000 XX Apr 3000 XX Apr 1000 Result will show like this: Sitecode MonthJAN MonthAPR -------- -------- -------- XX 4000...
View ArticleIs there a MySQL engine or trick to avoid writing so many temp tables to disk?
I’ve got a web application connected to a database running MySQL. Here’s the problem: a not insignificant number of queries create temporary tables and many of the tables involved have BLOB fields....
View Articletemporary table inside procedure oracle
I’m in a situation right now. I’m migrating several procedures from Mysql 5.0 to Oracle 11g. Mysql procedures allow me to: 1. Create temporary tables 2. Insert data into temporary tables / Query these...
View ArticleWhy is this query creating 300+ temporary tables in Mysql?
SHOW global STATUS LIKE '%tmp%'; set @UID = 132; set @param2 = 'cde'; set @param3 = 20130331; set @param4 = 'C'; select p.id, p.column44, p.column42, ue.column35, u.id, p.column43, p.column45,...
View ArticleCan I copy the table structure of a #temp table to a new physical table?
I have a #tempTable that was created using SELECT * INTO #tempTable FROM OPENROWSET('Microsoft.Ace.OLEDB.12.0', 'Excel 8.0;Database=MyFileName.xls', 'SELECT * FROM [Sheet1$]') Is there an easy way to...
View ArticleUpdate date Column values? any please help? [closed]
I Want to copy and data in same Table and Update date Column values? any please help?
View ArticleCan I remove #sql_ .MYD files?
I found some old files in the mysql datadir: -rw-rw---- 1 mysql mysql 0 2012-10-09 09:39 #sql_263c_0.MYD -rw-rw---- 1 mysql mysql 1.0K 2012-10-09 09:39 #sql_263c_0.MYI -rw-rw---- 1 mysql mysql 0...
View ArticleCreating a global temp table in MySQL
I am working on a MySQL stored procedure. I need to create a temp table and I want to access this temp table whenever I execute this stored procedure. I know we can’t access the temp table in another...
View Articlechanging TEMPORARY TABLE default collation
when I use CREATE TEMPORARY TABLE to create a temporary table, the collation of this table is utf8_unicode_ci by default. why by default it is utf8_unicode_ci? How can I change the default?
View Articleif block fails to create temp table in a procedure
I’m attempting to do this in a procedure: DECLARE @a bit = 1; BEGIN SELECT * INTO #aTemp FROM OPENROWSET( ... ); IF @a = 0 BEGIN SELECT ... INTO #bTemp FROM #aTemp; END ELSE BEGIN SELECT ... INTO...
View Articlebest practice for 'staging' relation in stored procedure: use temp table, or...
When I write stored procedures that take relation A and output relation Z, I like to create ‘staging’ relations along the way, so I can inspect the state of the data after each step in the programming...
View ArticleIs outputting to both a result set and a temporary table possible?
I have a stored procedure that I need to both output the result set to the user and use a piece of information in the result set to possibly output other result sets. Here is a basic schema of what I...
View ArticleCreate SP for inserting data from a table to a table
I have a table that has 1 record where one field may have 2 values separated by commas (in that cases I have to create 2 records with those values separated in 2 row and the other field values are the...
View ArticleCreate and fill temp table
I have a stored procedure that selects some data and returns it. Now I also want to add a temp table, fill it with data and return it with the stored procedure. I define it as follows: create table...
View ArticleMySQL excessive tmp disk tables after Upgrade to 5.6
After upgrading two MySQL-Servers which run Master-Slave replication from Percona MySQL 5.5 to Percona MySQL 5.6 an excessive amount of temporary Tables gets created on the slave. The Master seems to...
View Articlereuse of temp table getting more time to execute
i’m creating temp table as, SELECT T.CD, T.OBJECT_CD, T.PRICE INTO #TEMP FROM TABLE_NAME T EDIT : ADDED CLUSTERED INDEX TO TEMP TABLE CREATE CLUSTERED INDEX IX_Temp_OBJECT_CD ON #Temp (OBJECT_CD); and...
View ArticleSql Server 2014 AppRole not able to create temptable in tempdb
we have created Application Roles in sql server 2014 and grant the “Execute” permission on the tables and stored procedures. when i execute sp_setAppRole and then the stroredprocedure. the simple...
View ArticleCan't Delete Orphaned MySQL Temp Table
One of my servers had a hick-up yesterday and decided to leave temporary table while (while running alter table add indexes). ls -l sql -rw-rw---- 1 mysql mysql 8570 Mar 13 12:05 #sql-ib32694.frm...
View ArticleIs copy/rename a good way to improve temp table performance?
An application I am working with contains this sequence of queries at the end of constructing a large temp table; I believe it is an attempt to improve performance by pruning dead tuples - create temp...
View Article
More Pages to Explore .....