Newest Questions
105,298 questions
1
vote
1
answer
182
views
How one can install a given R package in SQL Server
I was asked to write a R code to do computations. I managed to do it such that it works well in R. Next, I was asked to do the same function in SQL Server. I was unable to do it as it requires a ...
1
vote
0
answers
1k
views
Using MongoDB mongorestore to append data to collection with existing records
We are trying restore documents in the dump that are not present in a collection and skip over documents in the existing collection using mongorestore.
This is how we run our restore command:
...
2
votes
1
answer
959
views
delete hung soon after vacuum verbose analyse
I have a fairly large java webapp system that connects to a postgres8.4 db on rhel.
This app only does inserts and reads.
This has been running without issue for 2.5 years and for the last year or so ...
1
vote
2
answers
103
views
Use a query's value in where statement
I'm searching how to do this and can't find it.
Here's my query:
SELECT
S_Product.Name AS "Name"
SUM(S_Item.Quantity) AS "QtySold"
FROM s_product
INNER JOIN S_Item ON S_Product.ID = S_Item....
1
vote
1
answer
594
views
Generating Pivot In SQL Server 2008
I am attempting to create a Pivot Table in SQL Server 2008, but I am getting an error of
Incorrect syntax near the keyword 'FOR'
Below is sample DDL and the query I tried to execute - how should ...
0
votes
1
answer
2k
views
how do I work out why my stored procedure won't compile?
I have a stored procedure whose sql file is nearly 6000 lines in length.
It's part of a series of DB build scripts which are used in lots of environments to build a standard DB setup.
When I attempt ...
3
votes
2
answers
5k
views
MySQL Large Table Indexes - Recommended length of index
I am working with a table that has a couple hundred million rows of data. It uses varchar(32) UUID's as it's keys both primary and foreign (there are two). I was wondering with this size of table, how ...
2
votes
0
answers
1k
views
Do MySQL locks expire?
Using InnoDB. I've read this article about the InnoDB locking model, but I could not find the answer to this question:
Do MySQL locks expire? If a process grabs a lock, will that process still hold ...
0
votes
2
answers
3k
views
MySql not displaying all columns in the result
I am trying to teach myself DBA. when I execute this query:
SELECT *, CASE WHEN Trans_type LIKE '%C%'
THEN 'Credit Card'
ELSE NULL
END AS type
FROM ...
1
vote
2
answers
2k
views
MySQL High CPU Usage (100% in peek times)
I have a simple LAMP server on Amazon EC2. (find the specs towards the end of this message.) I used the following command in the terminal to see status of each query
watch --interval=2 "mysqladmin -u{...
-3
votes
1
answer
254
views
SQL Server message 3154 Server 2005 to 2008
So a week ago I walked into a new job where they are migrating SQL Server from version 2005 to 2008 and later to 2012.
We have a great migration plan, been here done this before, like 8 years ago so ...
2
votes
2
answers
4k
views
Mysql Insert/Update is so Slow
I have a laravel application which must insert/update thousands of records per second in a for loop. my problem is that my Database insert/update rate is 100-150 writes per second . I have increased ...
3
votes
3
answers
209
views
T-SQL Optimization
If the answer is 'No', I'm OK with that...
I'm looking to see if this can be optimized any...it's part of a much larger stored proc. CGCode is varchar(50), Year and Month are smallint, FEIN is char(9)...
2
votes
1
answer
6k
views
Can't login as root and can't change root password
I have a MySQL 5.5 server on Windows 2012r2.
The database was not performing well, so I generated an ini at Percona and replaced that wit my old ini.
The server is performing good now, but now I ...
6
votes
3
answers
2k
views
SQL Agent PowerShell Syntax Error
I am attempting to setup a PowerShell script within a SQL Agent job (SQL Server 2016). I'm using a third party module, DBATOOLS.psd1 which appears to be where I'm getting my syntax error. Currently my ...