0
votes
0answers
5 views

Stored Proc generating dynamic SQL is slow for some paramaeters

I'm having issue with a stored proc that generates dynamic SQL , it performs ok for some parameters but very slow for some parameters. This has been an issue everyday and we are making some changes ...
1
vote
1answer
19 views

Efficient schema to handle time interval queries on a huge table?

We have huge table (+10 millions rows) where we aggregate the values by a using a time interval search on a Datetime column. And right now, to build single page on our app, we are querying this table ...
0
votes
1answer
7 views

Enabling SSL in MariaDB running on Synology NAS

I am having problems with enabling SSL in MariaDB running on Synology NAS (DSM version 6.0) using self signed certificates. I have modified the my.cnf file to point to certificate files and the DB ...
0
votes
1answer
12 views

Referring alias name in subselect returns “Unknown column in 'where clause'”

I have following table: + ---------- + --------- + --------- + -------- + ------------ + ---------- + | Field | Type | Null | Key | Default | Extra | + ---------- + -----...
0
votes
1answer
20 views

MySQL database has way too many connections

I have a MySQL version 5.7.12 database that has 4 applications running against them. Two of these applications are single webservers running Rails apps. The other two applications are also Rails ...
0
votes
0answers
6 views

Sybase ASE: How to know if a device has free space to extend a database on it

I am new to sybase ASE. I would like to know what are all the databases that have been using a device in sybase instance. sp_helpdevice or sp_helpdb are just giving not enough information. Is there ...
0
votes
1answer
35 views

Some tables don't have primary key, how can I fix this issue?

I have the following message when running myqsltunner.pl in past this was not present. How can I solve this issues? -------- Galera Metrics ------------------------------------------------------ [...
0
votes
1answer
6 views

Setting sql_slave_skip_counter is not working on Percona 5.6.24

I am currently running a master - slave replication where on my slave there is an sql error due to which my replication was stopped. when I tried to run the following good old solution SHOW SLAVE ...
0
votes
0answers
21 views

Slow MariaDB performance my.cnf

I migrated my eCommerce website database (Magento) from MySQL to MariaDB (10.0.25-MariaDB) and my site isn't performing as well as it did with MySQL. I've gone through my.cnf several times but to be ...
0
votes
0answers
9 views

renaming a table with locks ,tried sp_rename but no luck

I am trying to rename a table but it has many locks in it.Is there a way other than sp_rename ?
0
votes
0answers
18 views

MySql - Update the defualt table schema on production server

The story starts with a MySql table called table on the production server: As you can see, I f***ed up when specifying defaults - 0000-00-00 00:00:00 is not a valid MySql datetime. I need to ...
1
vote
2answers
24 views

In MySQL, how exactly does data flows from query to disk?

I would like to have clarity on how exactly data flows from the the time of firing a query till it goes to disk. (I have rough idea it will go to buffers, then to redo logs then disk files) but then ...
0
votes
0answers
7 views

MySQL - Move data between partitions aka re-partition

I have a mysql table whose partitions look as below p2015h1 - Contains data where date < 2015-07-01 (Has data from 2016-06-01. Hence only month worth of data) p2015h2 - Contains data where date &...
0
votes
1answer
23 views

How to restore MySQL databases from database files?

Our MySQL on Ubuntu 15.04 stopped working after we moved the computer to a new location and kept giving the missing socket file error. We couldn't really fix it after trying sudo apt-get install -f ...
0
votes
2answers
35 views

Update single table with mutualy exclusive threads

I have 2 threads (for example 2 different sql sessions) reading rows of the same table in parallel. They will do some processing and update a column to inform the row has been processed. Thread id:88 ...
1
vote
0answers
26 views

MySQL lost connection during query after specific record

I started getting the usual Error Code 2013 Lost connection to MYSQL server during query at a random moment when working on a PHP script. Some stuffs in the software still works, but the specific ...
0
votes
1answer
23 views

Using SQL MERGE to UPDATE a CTE

I have the following SQL... DECLARE @FromDate DATETIME ,@toDate DATETIME IF @toDate IS NULL SET @toDate = GETDATE() IF @FromDate IS NULL SET @FromDate = DATEADD(MONTH, -13, @toDate) SET @...
2
votes
0answers
8 views

Remove Data From Memory when Using SSAS Tabular In-Memory Mode

I use SSAS Tabular in In-Memory mode. I also use partitions to divide my data. So I will have one partition per month. AFAIK, when using In-Memory mode, server keeps processed data in memory forever....
4
votes
1answer
52 views

Understanding SQL Server statistics better

I have a table with 5,000,000 records with the DateOfBirth column spread between 1950 and 2007. The statistics histogram for the index only has two RANGE_HI_KEYs. I feel like the histogram should have ...
0
votes
0answers
9 views

SQL Server Express 2016 high CPU Usage as soon as I log into Windows

I have a Windows Server 2012 R2 configured for ASP.net applications that connect to SQL Server 2016 Express installed on the server. This server is a VPS with 3 cores and 1.5 GB RAM. The load on the ...
1
vote
1answer
30 views

mysqld is terminated because the system is low on memory; what to do?

I did recently a site migration; during that I had to erase all plugins and the reinstalling only the minimum as the site was causing the server to crash (A Vps with 1gb of ram), the most problematic ...
1
vote
0answers
12 views

Get missing index statistics in SQL Server 2014 [duplicate]

For example consider a database that has many SP and many query execute on it using ORMs. It's very time consuming that check every SP or profile all queries that ORMs generate for performance and ...
2
votes
1answer
18 views

Is DROP/ADD UNIQUE constraint in ALTER TABLE atomic?

I have a UNIQUE constraint of a number of fields on a table. Image that I want to change the fields in this constraint (remove one field). Normally I would do something like: DROP INDEX unique_name ...
1
vote
0answers
18 views

Why I can't install Git in my server using ssh via Putty? [on hold]

I connected to my server using ssh via Putty, and I typed the command apt-get install git or sudo apt-get install git but I get the error : -bash: apt-get: command not found or -bash: sudo: command ...
2
votes
0answers
24 views

Heavy I/O for Microsoft Transaction Log

We have a Microsoft SQL Server (SQL Server 2012 SP3), we've noticed that transaction log I/O is very high. We do have a busy server; we're hosted at Rackspace with SSD block storage. The Logs are are ...
1
vote
1answer
20 views

what is the performance impact if we have two asymmetric files on a Filegroup in SQL server database?

i have 2 database files under a primary file group, one is set to restricted auto growth (35 GB), the second database file from a same file group but storing in different drive from first one and kept ...
1
vote
0answers
18 views

where to find TPC-C queries

I've been looking around for specific TPC-C queries but haven't found good sources. Does anyone have a pointer? As I'm aware of, TPC-H only has 22 queries which could be easily found here http://www....
1
vote
0answers
7 views

Changing the Owner of Replication Jobs

Just wondering if there is any gotchas with changing the owner of a sql server replication job. The job owner is currently a domain account, but that person is leaving the company, so the account is ...
2
votes
1answer
24 views

How many Read IOPS are too many? (Should I upgrade my RDS instance memory?)

Amazon's best practices indicate you should have enough memory on your RDS instance to hold most of your dataset in memory, and that not having enough will result in more Read IOPS, as information is ...
1
vote
0answers
11 views

Error : Failed to Retrieve data for this request when expanding subscriptions in sql server 2008

We are getting error when expanding subscriptions to delete them, we have already dropped distribution database. The error text is "Failed to Retrieve data for this request.(Microsoft.SqlServer....
1
vote
1answer
16 views

Using Case with no column result

I made this solution but it continues not returning any value If the user not exists. select case when TypeId = 1 then 1 when TypeId = 0 then 2 when count(1) < 1 then 3 ...
1
vote
1answer
12 views

Trigger not functioning correctly in MYSQL

I am trying to set up a trigger to get it so if a new entry is either null or set to '000-00-00 00:00:00', that it will set the current datetime (NOW()). I can get the trigger to set the datetime if ...
1
vote
0answers
12 views

Access 2010-2016 Compatibility Error

I was just updated to Access 2016, while my users are still at Access 2010. I opened our database in MS Access 2016 once, didn't make any changes, and closed it out, and now all the users are having ...
1
vote
0answers
16 views

availability-groups

I was in the process of configuring aag on two new 2014 Enterprise servers. The configuration going good and the cluster, the nodes, the listener, the fileshare witness are online. Everything seems ...
1
vote
2answers
32 views

How can I hide a column using a Select statement?

declare @bid varchar(4) = '1007' select sr.release_date, sr.customer_id, sr.customer_name, sr.item_id, sr.item_desc, sr.order_no, sr.qty_on_hand, sr.release_qty, ...
1
vote
0answers
18 views

SQL Server 2016 - SSRS Unable to Upload Report Models - smdl Files

SSRS 2016 has major improvements and we've decided to migrate our 2008 servers. However, we and ran into a issue where we can't upload our old Report Models (.smdl files) via the web interface. All of ...
1
vote
1answer
20 views

Grant sysadmin permissions to 'NT AUTHORITY\SYSTEM'

As you all know, Microsoft SQL Server version 2012 and above are not enabled any more sysadmin role flag to Local System (NT AUTHORITY\SYSTEM) account. In my case it's becomes a problem: I have a WiX ...
1
vote
0answers
8 views

Mysql InnoDB relations vanish when exporting/importing to online database

My issue is the following : I have a local database running on EasyPhp server : WEB serv : Apache/2.4.7 (Win32) PHP/5.5.8 DB serv : 5.6.15-log - MySQL Community Server (GPL) PHPMYADMIN : version 4.1....
1
vote
0answers
21 views

SQL Server Maintenance Plan Help

SQL Server Maintenance Plan Help I'm using SQL Server Maintenance and found a way to selectively turn on and off various features of the plan via it's associated job shown in Figure A. This can be ...
2
votes
1answer
12 views

Combine intersecting ranges to produce new ranges based on the points of intersection

I have a table with data like this: ID valid_from valid_to item_a Item_b Item_c 1 20.5.2016 15:28:02 21.5.2016 7:12:49 1 2 - 1 21.5.2016 7:12:50 ...
1
vote
1answer
19 views

Import .sql file into multiple databases

How to import .sql file into multiple databases at one shot. I have tried this: mysql -uroot -p -all-databases < test.sql But it asks for database name. Whatever there in test.sql file should ...
0
votes
1answer
20 views

Postgres: turn off formating for xml export?

I want to export some table to xml file: \o output.xml SELECT table_to_xml('modified_records', TRUE, TRUE, ''); However, I'm struggling with psql formatting. The best I managed to get is: \t on \x ...
1
vote
0answers
21 views

Select query with views crashes with ORA-03113: end-of-file on communication channel

I've installed an application developed on 11g XE in a 11g Enterprise Edition server (Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production) and main SELECT query triggers this: ...
1
vote
2answers
24 views

How to model that several variants of a merchandise item may affect its price?

I am an absolute beginner to relational data modelling. I hope my question will be acceptable here nevertheless. Let’s say there’s a merchandise. An item of merchandise may have variants. (While it ...
1
vote
1answer
17 views

Will Installation of Service Pack 3 on SQL Server 2012 Web Edition (existing production) require database restore activity?

We are currently running our Database Server on a RTM version: Microsoft SQL Server 2012 - 11.0.2100.60 (X64) Feb 10 2012 19:39:15 Copyright (c) Microsoft Corporation Standard Edition (...
0
votes
2answers
14 views

KILLED/ROLLBACK query doesn't stop running

I've tried to kill a query on ms sql server management studio. Now it has the status killed/rollback. When I use: kill 74 with statusonly it doesn't make any progress. It is still at 0%. How can I ...
1
vote
0answers
19 views

How can i sync a table between two MySQL RDS insatance

I am trying to sync one table in two of mysql RDS instances in AWS something like a db link or FEDERATED engine.
2
votes
3answers
32 views

How to merge multiple query results into one

1. SELECT COUNT( * ) FROM tbl_shipment WHERE `awdno` != '' AND `prtner_name` != '' GROUP BY prtner_name 2. SELECT SUM( inscan ) FROM tbl_shipment WHERE `awdno` != '' AND `prtner_name` != ...
-1
votes
0answers
11 views

How can i get created function dates in postgresql? [on hold]

I want to know about newly function created date in postgresql.

15 30 50 per page