All Questions

0
votes
0answers
22 views

Left join with same table making query too slow — MySQL

We have a table server_user_disk_usage which tracks the disk usage of users from different servers. Query is to find sum of last disk usage of each user from different servers SELECT m1.user_name, ...
0
votes
1answer
22 views

Sequence according to value from table in postgresql [duplicate]

I have dictionary_type and dictionary_value tables. Value is connected with type. I would like to create sequence which will set the id of values according to type id. Expected dictionary_type: id ...
1
vote
0answers
23 views

Database design for multiple units of meassurement and pricings for each item/product

Table Products id_product| name | .... 1 | abcd | .... --- Table Pricing id_price | qty | price_type | price 1 | 20 | discount | 20 --- Table Unit id_unit | ...
3
votes
3answers
89 views

SQL Server: Performance Insert Into vs Select Into

I am hearing different things from colleagues/research. What are good guidelines in performance for, Select Into vs Insert into when creating a temp table? I know difference is minimal for small ...
-1
votes
0answers
18 views

Inconsistent MySQL backup duration

Im having a problem with my database. The issue is my backup time using mysqldump is inconsistent. On average, the duration is only for 1hour 30minutes but sometimes it goes to 4, 6, and even 10 Hours ...
3
votes
1answer
48 views

log ship from older version to newer one

As per below thread from SQL Server: Can I log ship from SQL Server 2014 --> 2016? Always log ship UP as it's a basic supported upgrade process. you can't log ship DOWN. The question you might ...
0
votes
2answers
37 views

MySQL Using AND Statement

I am having issues with this question: Find the cities that have direct (non-stop) flights to both Honolulu and Newark. The answer should be Dallas, since its the only location that has ...
-1
votes
1answer
39 views

Query joining four tables resulting in one row

I have these two queries which pull data from four tables: select files.id, files.name, dirs.dir from files inner join dirs on dirs.id = files.idDir where files.id = 45 select label from labels ...
0
votes
0answers
12 views

Percona Audit plugin making the MySQL Server not to start

First I Installed the Percona audit plug-in on our MySQL Server (my MySQL Server version is 5.5.38) and then I stopped the mysql server and then in the my.cnf file added the variables like: ...
3
votes
1answer
34 views

Definition of indexing, datatype configuration, and DBMS for SHA3-256 hashes

I am designing a system within which I will need to be able to search a database using a file or string SHA3-256 hash. For example the hash of test is ...
2
votes
2answers
107 views

Is “SET IDENTITY_INSERT” required to insert arbitrary GUID into [uniqueidentifier] column?

SQL Server 2016 and 2017, Standard Edition I need to insert raw data (from another table) into a table that has two uniqueidentifier columns. Does this require that I use SET IDENTITY_INSERT Carrier ...
1
vote
0answers
31 views

Is Big data solutions a good option for 500 million temporal records?

So I have about 250k items x 2000 days (2010 to 2019) ~= 500 million records. For each item I have variable number of fields. To begin with we have 50 fields defined for each item but in the future ...
-3
votes
1answer
40 views

SQL Server Availability Group replica not the same as the Failover Cluster node? [on hold]

I have a database that lives on a 4-replica Availability Group and a 4-node Windows Server Failover Cluster. Currently they are on D and A, respectively, and it appears to be running ok. Is there a ...
3
votes
5answers
74 views

How to stop a job for the rest of the day after the relevant condition has been satisfied once?

I have a job that runs every 5 minutes to check an IF condition. If the condition is true, it will send an email, if not, it won’t do anything. My problem is that once the IF condition is true, it ...
0
votes
0answers
24 views

Azure Managed Instance Log file Larger than Data File

Good Afternoon, I am working with the Brent Ozar tools on an Azure SQL Server Managed Instance. Once of the things that came up when I ran the sp_Blitz procedure was that I had several databases that ...
-1
votes
0answers
45 views

Oracle client install not working properly [on hold]

I've been given a new laptop (yay!) but have to reinstall everything (boo!) I'm trying to setup the Oracle 32-bit client on Windows 10 Enterprise. I'm using 32-bit since that is what on the old box. ...
0
votes
1answer
73 views

Why do I receive the error message “'<column name>' must appear in the GROUP BY clause or be used in an aggregate function”?

Where am I going wrong? Why am I getting that message when I add the MAX function? The query involved: WITH references_cve AS ( SELECT vulnerability_id, reference FROM ...
-1
votes
0answers
39 views

“Dynamic” column names as (Month + Day) in SQL Server 2014 [on hold]

After joining multiple tables, I was able to get the desired output for one day like shown below: I am selecting rows from temp table. Now - these rows are only for one day, and if I give the date ...
-1
votes
1answer
47 views

Get the average of unique city to city distances

I tried to obtain the desired result with the following query: Select city1, city2, Avg(distance) from table group by city1, city2; ...but this SQL statement is resulting ...
2
votes
5answers
62 views

Will a VM backup of a SQL Server work for restoring the SQL database

I am wondering if a VM backup will restore a SQL database with out integrity issues.... Ie… we backup SQL nightly and keep 3 copies, we backup with VM and keep 14 copies.... if we had to restore ...
0
votes
0answers
24 views

SQL Server - Cannot reorganize index on “extended_index” table

I have a maintenance plan that includes an index reorganization step. I am getting the following error in the job history: Executing the query "ALTER INDEX [SpatialIndex-20180705-165942] ON [dbo......
2
votes
1answer
16 views

Longitude and Latitude order with ST_X, and ST_Y on SRID 4326

I have a MySQL 8.0.15 and I am experimenting with the geo-spatial location functions. I have applied SRID 4326 to the "loc" column. Nothing in the docs other than the primitive Point() suggests the ...
0
votes
1answer
12 views

Does requiring SSL matter if using AWS RDS and AWS EC2 in a VPC

I have a MySQL RDS DB and am connecting it through an EC2 instance. My RDS isn't publicly accessible, so I think it can only be connected to through my EC2 instances. I see at this link https://...
0
votes
0answers
11 views

Learning Percona Monitoring - CPU Usage

I've just started using the Percona Monitoring. I am not necessarily a db admin but I ended up with the task. I am enjoying it but truth be told I am not sure what I am looking at. There is an ...
4
votes
2answers
42 views

Performance issues with groupwise MAX in JOIN clause

Problem I have some assets in my application which are updated from time to time in an asynchronous fashion. The example I'm gonna use here is Vehicles. There are two tables: Vehicles: holds ...
-1
votes
0answers
27 views

Scheduled Server Re-starts? [on hold]

What are your recommendations for scheduled server re-starts ? Are they helpful or harmful ? If helpful, how often should they be done ?
0
votes
1answer
20 views

Error: change in schema version between compile time and run time - SQLNCLI11

This is a head scratcher. I've searched the forums and no one has been able to answer this. Not even GilaMonster on SQLServerCentral has chimed in on this one! One user suggested that it may be ...
0
votes
1answer
96 views

SQL Server major performance difference between two versions [on hold]

I have SQL Server installations. Both run under HyperVisor on the same processor. They both have the same number of core/RAM/disk space assigned. One is the old server and the other is the new one. ...
1
vote
0answers
10 views

How to setup two mysql servers with group replication to work individually, when no network

I have two mysql servers in two different places. Both servers must be able to read and write. All tables are designed to based on unique id (UUID) primary key. I want to sync these two databases live ...
0
votes
1answer
34 views

Hitting a transactional table, or copying the data to a temporary table?

I have the following query (Pseudo SQL warning): select count(*), groupcolumn from table where date is < 6 days ago and > 7 days ago AND date is < 13 days ago AND date > 14 days ago......
0
votes
1answer
16 views

MySQL stalls and strange threads/connections behavior is observed

We have a MySQL instance which most of the time works just fine. From time to time, however, we observe strange behavior. What happens is that suddenly MySQL connections reach the limit (currently set ...
1
vote
2answers
15 views

How to import Azure blob file into Sql Server 2008

Is there a way to import Blob files into sql server 2008 other than using CLR ? The file size is around 300MB so CLR isn't efficient enough. Is there a possibility to use BULK INSERT or OPENROWSET in ...
18
votes
4answers
3k views

Is it bad to have index space larger than data space?

Often I need to run queries against large tables that don't have the right index. So I ask the DBA to create such index. The first thing he does is look at the table statistics and see the index space ...
0
votes
1answer
16 views

Transaction Replication on Azure MI servers

I'm struggling to verify whether an Azure Managed Instance of SQL Server can both subscribe to Transactional Replication, and Publish, at the same time - I've been googling like a demon and ...
1
vote
1answer
21 views

Connection Issues with Informix OLEDB Provider

I've been trying to establish a OLEDB Connection to an Informix Dynamic Server. (Version IBM Informix Dynamic Server Version 12.10.FC12WE) Background Info: A program, which will be used by my ...
0
votes
1answer
27 views

Migrating triggers, functions and procedures from Oracle to PostgreSQL

We run a Java based application which uses Oracle as its backend. While they are rather simple and don't overly use Oracle specific functions, we have lots of triggers, function and procedures written ...
0
votes
1answer
13 views

Insert into value as generate row with different minutes

I try backup and restore using WAL-E/WAL-G. I can backup and restore. But i want check recovery_target_time. During recovery, by default WAL-E will attempt to pull and restore all WAL segments ...
0
votes
1answer
28 views

SELECT vs COPY (SELECT) TO STDOUT

I need to read more rows than fit in memory, resonably fast. I see two options: SELECT ... where my bindings use a cursor to stream the rows; COPY (SELECT ...) TO STDOUT (FORMAT binary) where my ...
0
votes
1answer
14 views

MySQL error 1674 even when binlog is set to ROW

I am trying to alter table by doing, ALTER TABLE Account ADD `AccessCode` binary(16) NOT NULL DEFAULT (UUID()) It gives me error, Error Code: 1674. Statement is unsafe because it uses a system ...
0
votes
1answer
27 views

Error (2.17): PLS-00201: The identifier 'DAYS_INTERVAL_TABLE' must be declared

I recently installed an Oracle 12c in Oracle Linux 7.6, it was previously in Windows. In the first database restored, some functions are with compilation errors. The query below informs you that ...
0
votes
0answers
20 views

Salesforce source SSIS Package error

Im extracting data from salesforce using COzyroc SSIS component. This package is scheduled as job in MSSQL server which runs on daily basis. This job failes on alternate days. One day it is executed ...
0
votes
0answers
11 views

How does query parameters work under the hood?

I thought about how can it work under the hood and I came with an idea Db engine receives query with parameters and also defined values of those parameters SQL is being parsed into syntax tree like ...
2
votes
1answer
37 views

Incorrect datetime value: '0000-00-00 00:00:00' for column 'tmp_field_2' at row 1

I'm trying to run the following query: INSERT INTO `user_domain_rating_days` ( `user_domain_rating_id`, `start`, `...
0
votes
1answer
29 views

Oracle DB union two select statements which return multiple rows

I am trying to create a union inside a stored procedure which unions two select statements. One of the select statement returns two or more rows. Thus I get the error "exact fetch returns more than ...
1
vote
0answers
24 views

Cannot access remote table after parallel/insert direct load txn

This is the Oracle error message I'm getting ORA - 12840. We just upgraded from 10i to 12c version and some of the processes aren't working as they did before. I get this error when I execute a CREATE ...
0
votes
0answers
9 views

do tmpdir is cleaned up automatically

While testing a 3 node percona cluster we often get: Errcode: 28 - No space left on device After login to the servers and checking the defined tmpdir I notice that is empty and clients can connect ...
2
votes
2answers
24 views

How can I position the element generated by XMLTEXT in a FOR XML query?

I'm trying to use FOR XML to simulate an OData feed. One of the requirements I have is that somewhere I need an XML element which is constant for all records; I was planning to use the XMLTEXT ...
0
votes
0answers
49 views

Basic Questions about SQL usage with multiple users [on hold]

For a science project we need to use a database with multiple users in different places. At the moment we use SQLite for testing. But as we are pretty new to the whole Database world there are some ...
1
vote
2answers
61 views

Is it possible to override a ReadCommittedSnapshot isolation level with ReadCommitted isolation level for a particular transaction?

The default isolation level of my database is "read committed snapshot". Please see the below screenshot. I have the table "Tickets' with the following data in my database. Now in connection 1, I ...
0
votes
0answers
9 views

Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)

Getting one issue in error log in every 30-45 mins. Mysql version 5.6.20-log Server is slave of master main server and its having 100 slaves to this server. Replication hierarchy is there in 3 stages. ...

15 30 50 per page