0
votes
0answers
4 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
7 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 ...
0
votes
0answers
6 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 ...
1
vote
1answer
14 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 ...
0
votes
0answers
15 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 ...
1
vote
0answers
19 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 ...
0
votes
0answers
12 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 ...
0
votes
0answers
11 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....
0
votes
0answers
5 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 ...
1
vote
0answers
14 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 ...
0
votes
0answers
9 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....
0
votes
1answer
15 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 ...
0
votes
1answer
11 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 ...
0
votes
0answers
11 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 ...
0
votes
0answers
11 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 ...
0
votes
1answer
27 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, ...
0
votes
0answers
15 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 ...
0
votes
1answer
18 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 ...
0
votes
0answers
3 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....
0
votes
0answers
20 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 ...
1
vote
1answer
10 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 ...
0
votes
1answer
17 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
18 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 ...
0
votes
0answers
13 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: ...
0
votes
2answers
21 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 ...
0
votes
1answer
15 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
0answers
14 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.
1
vote
3answers
28 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` != ...
-2
votes
0answers
10 views

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

I want to know about newly function created date in postgresql.
7
votes
2answers
342 views

Is there a way to make this select retrieve the same results with a single seek?

Is it possible to retrieve the same data as the following with a single seek or scan, either by modifying the query or influencing the optimizer's strategy? Code and schema similar to this are ...
0
votes
2answers
17 views

Best practice for parent child relation

Suppose, there are some tasks and some sub-tasks under those tasks For example: Task 1 Sub task 1.1 Sub task 1.2 Sub task 1.3 Sub task 1.4 Task 2 Sub task 2.1 Sub ...
0
votes
0answers
13 views

New percona xtradb node shuts itself down shortly after launch

We currently have a 3 node percona xtradb cluster running on premises. We are trying to add a 4th, remote node ( Obviously split-brain is a concern in this situation but it is only temporary while we ...
0
votes
0answers
16 views

Auto increment id column vs index VARCHAR columns

I'm wondering the differences or comparisons of having an Auto Increment int Id column or an indexed VARCHAR(32) column. Which one would be faster if I had a second table that references the first ...
0
votes
1answer
8 views

Routinely deleting aged postgresql rows via cron

I have a Django website with a postgresql 9.3.10 backend. The website contains dynamic user-generated content (think of it as a form of 9gag). There are some tables from which I routinely delete aged ...
0
votes
0answers
10 views

ERROR 1091 (42000): Can't DROP 'PRIMARY'; on “mysql_upgrade”

I updated MySQL from 5.5.50 to 5.6.31 on a Centos 6.8 box with Plesk 12.5.30. Using those steps. The upgrade was successful but I ran into trouble with mysql_upgrade. I had to rebuild the permission ...
-1
votes
1answer
23 views

Joining columns with null values into one row [on hold]

I used a sub select to get the data I want. I'm struggling to merge it all into one row now though. This is an example of the result where its bike but there are loads on them: bike bike ...
0
votes
0answers
11 views

Add Shapefile loader plugin to PgAdminPortable

I'm using PgAdminPortable and I'd like to enable « PostGIS Shapefile and DBF loader » plugin. The issue is that the files are not structured as in a PostgreSQL complete install (see below). I have ...
0
votes
0answers
4 views

.DBC (FoxPro DBF) > FoxPro ODBC Driver > MIDDLEWARE > SaaS

I've been searching for Visual FoxPro ODBC Driver and finally found it. I am using a middleware to connect a .DBC (foxpro) > MIDDLEWARE > SaaS. I see from postings on MSDN that Microsoft suggests ...
0
votes
1answer
26 views

Change all varchar date formats with a single query

|date(varchar) | |--------------| |2016-02-16 | | -------------| |03-12-2015 | |--------------| |07-07-2007 | |--------------| |2016-03-14 | Dates are stored in different formats and ...
0
votes
1answer
20 views

Linkserver update not working in Transaction

I am trying to do operation on my linked server. I have created one linked server and everything is ok. I just observed one thing which I am not able to understand. if I run: update SERVER.testdb.[...
-5
votes
0answers
49 views

Is it possible to take MS SQL Server 2012 backup in particular date range? [on hold]

Is it possible to take MS SQL Server 2012 backup in particular date range?
0
votes
0answers
17 views

single Small Table with more rows or single large table with less rows [on hold]

I need to design a table to hold an various records coming from the source. The records are such that they have around 20 fixed columns that are common to all. There are another 10 to 15 columns which ...
0
votes
0answers
8 views

Copy tables from another sql server in another PC to My SQL SERVER database

i want to copy table data from one database in another pc to my local database in different pc. Can anyone help me with that. i have a different method of doing that but i need another method.i want ...
0
votes
0answers
11 views

Joining tables in Eloquent ORM based on condition to disallow duplicates

I have two tables I am looking to join data. This is a friendship table based on a recommendation I've seen on here. It's an AB BA relationship between friends. I want to join this with a profile ...
2
votes
1answer
55 views

Is it Ok to use GUID as the Foreign Key?

Here's my current situation: We have a table storing data submitted from the website form, say "MyTable". The table uses bigint (auto-increment) as the primary key. Everything is good so far. Now, ...
1
vote
1answer
31 views

How to select user that doesn't exist in the second table

I am trying to understand how to select a user from users table that is not associated with current user in user_follows table: neither in users_id not in shown_users_id. Basically a new user that ...
0
votes
0answers
10 views

read-ahead reads in 'workfile' cannot be disabled

In SQL Server, I used "DBCC TRACEON (652)" to disable read-ahead reads. However, the output of TPCH query 9 (http://www.qdpma.com/tpch/TPCH100_Query_plans.html), shows: Table 'supplier'. Scan count 9,...
0
votes
0answers
10 views

Restoring a backup of 1 database to another puts both databases into Restoring mode

We have a 2 databases- Staging Test At times, we refresh out Test environment with a copy of Staging. We do this by taking a full backup of the Staging database and restoring it over the Test ...
3
votes
0answers
18 views

Tool to automatically refactor queries, replacing subqueries with CTEs [on hold]

I have to mantain very big and complex SQL queries (more than 1000 lines) with many nested subqueries. These queries were made by other people and are very difficult to understand, so I want to ...
-2
votes
0answers
27 views

Get Users Ranking based on points from DataBase ( MYSQL) [on hold]

bonsoir tt le monde , j'ai cree un site web ou les membres collectent des points pour gagne un cadeau a la fin du tournoi et je veut faire une page du TOP 10 membres dans laquelle cette derniere ...

15 30 50 per page