All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
2 views

Bottleneck when inserting many rows into different tables

TLDR: I want to bulk insert into many initially empty tables at once, without the performance of each insert being affected too badly. I seem to be hitting a performance bottleneck I can't yet explain....
8
votes
2answers
16k views

Can we commit the transaction when the sql server trigger fails?

I am trying to avoid data loss when the insert trigger on a table fails. I am trying this with the following scenario and my code is failing. When an insert happens on the Customers table, I want to ...
0
votes
0answers
3 views

Difference between AlwaysOn with 'WSFC' as the Cluster Type and 'AlwaysOn Failover Clustering'?

Per what I understood: Clustering is used for HA, where you can failover automatically, and it should be fast since the DB files are in a shared disk, so it would just be “reconnecting” the disk to ...
0
votes
2answers
12 views

How do I migrate Postgres database using an intermediate file

I have a PostgreSQL v9.5.23 database on an Ubuntu 16.04 server that I want to migrate to a new Postgres 12.4 installation on an Ubuntu 20.4 server. The network pipe recommended by the Postgres docs ...
0
votes
0answers
3 views

Issues with mydumper

Recently I changed my default backup tool from mysqldump to mydumper because it was FAST! I was quite happy with the results, and a few days ago I decided to import one of my dumps. For my surprise, ...
3
votes
1answer
18 views

Is there a way to allow only DELETES from CASCADES only?

I want to prevent anyone from deleting certain records from a table, except for when the parent record in another table gets deleted, then should it be deleted. Can I use triggers for this purpose?
1
vote
0answers
5 views

SQL Server BULK IMPORT Truncation error

I am trying to import a simple CSV file into a table on SQL Server 2017. The CSV file and table match each other in number of columns and data types. This is an extract of the CSV file: UID,...
0
votes
2answers
814 views

calculate average of a class where students offer different number of subjects

I am trying to calculate the class average of a class where students can hold different amounts of subjects (e.g.: two students in a class of which one takes 3 subjects and the other 2). How do I get ...
1
vote
0answers
10 views

where is memory going in In-Memory OLTP?

I have only memory optimized table in my database. When I am running below query, I am getting pages_mb for that DB as 710 MB. SELECT type , name , memory_node_id , pages_kb/1024 AS pages_MB ...
0
votes
0answers
5 views

How do I move tables and indexes owned by user to new tablespaces in Oracle 19C?

I have a user named SDE and the tablespace for this users tables are in SDE_TBS, I would like to move all of these tables to tablespace SDEBUS_DT. For indexes I would like to move to SDEBUS_IX. How ...
0
votes
0answers
14 views

Problem with unmasking a database user during a sproc

hope you can help. I am having an issue with a stored procedure that refreshes dynamic data masking on a database. This sproc is run as a job against all databases on this server. The problem that I ...
0
votes
2answers
21 views

MySQL do not accepts wildcard for tables name level grant

Trying to grant a user select privilege on multiple tables using wildcards as following: GRANT SELECT ON 'DBname'.'foo_%' TO 'username'@'%' IDENTIFIED BY 'password'; But keep giving the following ...
0
votes
0answers
6 views

Query doesn't return data that's written recently

I have two micro services where one write to DB and another read from DB. The first micro service is written in C++ while the other is written in NodeJS. When querying for data say for a IP the ...
0
votes
1answer
21 views

Problem installing Oracle 19c to symlinked directory from RPM

I've created destination directory and linked it to default install path: $mkdir /u01/oracle $ln -s /u01/oracle /opt Then I've changed the owner: $sudo chown -R oracle:oinstall /opt/oracle But when ...
1
vote
1answer
75 views

Multiple m:m relationships LEFT JOIN giving duplicate records

DB noob here. I have a table named invoice with a m:m relationship with a few other tables via junction tables: invoice_customer invoice_creator invoice_deposit invoice_withdrawal ...
1
vote
1answer
28 views

Non-clustered index with WHERE clause

I have a large table (around 100 million rows). I am trying to optimize searches. Most of my searches use two columns: bar nvarchar(64) and foo nvarchar(64). I am only interested in foo when: foo = '...
0
votes
1answer
26 views

SQL Server second transaction log seems to be used as well - not only after first one is full

we have come across a strange phenomenon using a second transaction log file for a database. Microsoft SQL Server 2016 (SP2-CU7) (KB4495256) Standard Edition. On Windows Server 2016, a single instance,...
7
votes
3answers
18k views

mysql multi threading for a single query

I have big db of size 8GB and having 9 million contacts in this db. When we try to retrieve all contacts, it takes nearly 1 or 2 hour (in some cases result in timeout) to retreive all contacts for the ...
0
votes
1answer
116 views

Point in time restore fails - backup file from before the restore point not available (why does this matter)

I have tried to do a point-in-time restore of a database through the management studio gui, the point-in-time being yesterday morning (2016-04-12). This fails with the error "...cannot open ...
0
votes
0answers
9 views

Postgres Logical Replication to AWS Aurora Postgres with or without Database Migration Services

I have an end goal of migrating a large Postgres (v10.7) database (3TB) from one cloud provider to AWS Aurora Postgres. Here are my constraints and approach: Current / Non-AWS Cloud Platform will not ...
-2
votes
0answers
17 views

failed to login user 'Guest'

i have a client server application (sql server 2008), the application on the server is working fine but on the client is not working, with an error "failed to login user 'Guest'", know I 've ...
0
votes
1answer
220 views

Multi-master (NoSQL) database solutions with cloud and no-premise option

We are currently investigating database options for distributed database (possibly globally distributed) where the data in general is stored in "cloud" (this would not be a special requirement). The ...
220
votes
14answers
561k views

connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host

Hello I am trying to run a website sent to me but after doing so this error appeared connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "4X.XXX.XX.XXX", user "userXXX", database "...
0
votes
0answers
12 views

Highly Available DB with consistent hashing P2P design

I am learning about HA DBs https://www.interviewbit.com/problems/highly-available-database/ According to the above, here is how writes/reads happen in this system Write request: A client can contact ...
1
vote
1answer
2k views

Oracle 12c Database swapping after set up huge pages

I need to setup a Oracle Database 12c with 64GB RAM on Linux RedHet. I decided to use huge pages. Something must have went wrong. Altertlog: WARNING: Heavy swapping observed on system in last 5 ...
0
votes
0answers
16 views

High CPU when executing a Postgres query spanning multiple tables

We have an application which executes jobs. The job usually consists of a single transaction in which around 4k rows are inserted/updated across 13 relations. The transaction takes around 2 minutes to ...
13
votes
4answers
38k views

How to add a column with a foreign key constraint to a table that already exists?

I have the following tables, CREATE TABLE users (id int PRIMARY KEY); -- already exists with data CREATE TABLE message (); How do I alter messages table such that, a new column called sender is ...
2
votes
2answers
33 views

Replication in sql server 2019?

I am reading 'Pro SQL Server 2019 Administration' book from Carter, and when detailing HA and DR options, 'replication' is not mentioned: Why is it omited? Will Replication be deprecated soon?
0
votes
1answer
416 views

Get partition column for a table in Greenplum

How can I find what the partitioning scheme is for a table? Is it in information_schema or in the pg_class related tables?
1
vote
0answers
17 views

How to hot merge MariaDb databases from multiple servers into a single one

Current Configuration I currently have 3 servers: server australia with the database canberra servers belgium and germany are a galera cluster with the database bruxelles. Target Configuration My ...
0
votes
1answer
45 views

Cluster is causing my query to run SLOWER then before

So I have been stuck on this for 6 hours now and I have no clue what to do. I am doing university homework that requires us to create a unoptomized sql query (does not have to make sense) and then ...
4
votes
4answers
7k views

Difference between an Entity and a Relation

I am currently reading about entities and relations and I can't understand the difference between them? According to Wikipedia we have an example of a relation like in the pic: This looks exactly ...
2
votes
1answer
28 views

log send queue size and redo queue size in AG

I am trying to figure out the way to monitor these 2 events log send queue size - I can see this in perfmon Redo queue size - I can see in dmv but not in perfmon counter Is there any way of using ...
4
votes
3answers
6k views

Should I use data type SERIAL for table id columns?

I found out that there is a mysql datatype called SERIAL, it appears to be designed for use as an id column. However some of my peers don't think that the real data type BIGINT implied by SERIAL is ...
0
votes
1answer
1k views

Which MySQL shows CPU usage?

I am monitoring MySQL server using phpMyAdmin [Status => Monitor] function. And it shows a number of useful graphs. Which variables (or which mechanism) is phpMyAdmin using to pull this data? ps. ...
-1
votes
1answer
347 views

ERROR [XulParser] handler not found: W?NDOW

PDI(spoon.bat) crashes on startup. Here's /logs/spoon.log: 09:59:04,793 INFO [KarafBoot] Checking to see if org.pentaho.clean.karaf.cache is enabled 09:59:08,932 INFO [KarafInstance] ***************...
0
votes
2answers
26 views

What can cause higher CPU time and duration for a given set of queries in trace(s) ran on two separate environments?

I'm troubleshooting a performance issue in a SQL Server DR environment for a customer. They are running queries that consistently take longer in their environment than our QA environment. After ...
0
votes
1answer
83 views

Why does a CTE cause a full table scan? [duplicate]

UPDATE I've posted a newer more focused question How to use index for simple time range join? I'll keep this for reference. ORIGINAL I have a large (~100 million rows) timeseries table t_16 where ...
0
votes
1answer
39 views

What is an ODBK file and how to restore that?

I have recently come across a situation where I am required to restore an ODBK file. Basically this is a database file of Intergy Server (An EHR platform). I don't know how to restore that file into a ...
0
votes
1answer
1k views

Access SQL Server Configuration Manager on a remote server

I am trying to add a traceflag as a startup parameter to a distant SQL Server 2016, installed on a Windows 2016 core server and I am following these instructions At this point in the document: ...
0
votes
1answer
13 views

How to set statistics level of a table in postgres?

I know how to set statistics level for a particular column i.e alter table table_name alter column column_name set statistics 100; However, if I wish to set statistics level for a particular table or ...
7
votes
1answer
11k views

Mapping a shared physical folder to filestream

We are working on a project where we have large amounts of images, texts etc which we need to work on in SQL Server. We were thinking of using Filestream and filetable functionality. However, even ...
0
votes
1answer
16 views

How to monitor general performance and wellbeing of a database?

I've read @Mike answer to How to tell if database tuning is fruitful (PostgreSQL), and that's the kind of approach I'm thinking about for monitoring the performance of my database (of a web ...
0
votes
2answers
753 views

Deadlock on inserts to a single table with a single key. (Mysql)

I have a simple game server. One of the requirement i received was to handle a single request for a single player at a time. so in order to achieve that i decided to create a lock table: CREATE TABLE ...
0
votes
1answer
14 views

What are some good Auto vacuuming starting points Postgres? for high write,high update,and mostly read table types?

What are good Auto Vacuum settings (Recommendations) for tables like High Write Table Insert load that range between 30-10,000 inserts in a day the table can idle in weeks without load but can get ...
0
votes
2answers
24 views

Database table design for many to many

I have three tables: User, Role and Project User Table User_ID|Email |Name | -------|------------------|---------| 1|bobtest@gmail.com |Bob | 2|marytest@gmail.com|Mary ...
0
votes
2answers
191 views

usage percentage of Mongodb internal cache

I've ran two performance test on a MongoDB server with identical environment/settings AFAIK. I found that the throughput was 10% apart. When I inspected the mongostat logs, I found that Mongodb in ...
1
vote
1answer
152 views

MariaDB Inner join is slow

Here is my SQL (with explain): EXPLAIN SELECT * FROM GBI gbi INNER JOIN VF_KRED kred ON gbi.vendor = kred.vendor; Giving below the outcome: Now, the select SQL takes ~10 seconds to produce the ...
2
votes
1answer
24 views

How to fetch related rows on multiple condition with ranking

I have following table for storing item information in PostgreSQL. id | name | category | seller | m_age | status | type_id | region | ----------------------------------------------------------...
1
vote
1answer
772 views

Force replication to statement for INSERT to a table to fire trigger on slave

We have a PROD DB which replicates into a slave DB using mixed replication. We want to add a trigger so that a row is added to our DW when a row is INSERTed into table_a (on master). The issue is that ...

15 30 50 per page
1
2 3 4 5
1727