All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
31 views

Moving records between tables in CockroachDB is taking too long

I have a requirement where I have to move records from table original_table to table new_table for the last N days. Below is a small sample of my basic script that does this. while True: result = ...
Brunaldo's user avatar
1 vote
3 answers
69 views

What is the Postgres Equivalent of SQL Server's Query Store?

I consider Query Store to be the best idea that Microsoft's SQL Server has had in the past ten years. I worry that I will miss it very dearly when I move to Postgres. What equivalents does Postgres ...
J. Mini's user avatar
  • 103
1 vote
1 answer
24 views

Does Docker stop take of care of stopping gossip and drain?

We have a setup where we have 3 cassandra nodes running as a cluster. We are using cassandra docker container with cassandra version 4.1.3. So, in this scenario what happens when one of the node ...
Manju K B's user avatar
0 votes
0 answers
63 views

Properly DELETE 500k+ Rows from Multiple Tables in a Single Script

There are several examples all over the Internet and StackOverflow on how to properly delete 500k+ rows from a single table and COMMIT those DELETES in Batches. I am unsure of how to incorporate these ...
Code Novice's user avatar
0 votes
0 answers
31 views

Loading .sql file to MySQL via symbolic link

I have an existing MySQL 8 installation on a Ubuntu 22.04 system that relies on the standard /var/lib/mysql datadir. I'm trying to load a dumped .sql file to a new database, but it's too big to be ...
Chris's user avatar
  • 181
0 votes
0 answers
40 views

What is the best way to recompile invalid objects in Oracle?

I've inherited a group of Oracle instances and I've been deploying SQL scripts provided by a vendor that occasionally ends up moving various database objects into an invalid state. This in turn kicks ...
Eric Swiggum's user avatar
0 votes
1 answer
20 views

SQL Server replication: Need to remove articles from the publication

I am replicating the data from the Database1 on Server1 to respectively, Database2 on Server2. Now, the requirement is to remove certain tables form being replicated - so I will remove them from the ...
Dmitriy Ryabin's user avatar
0 votes
1 answer
55 views

Repeatable reads in case protection from duplicated inserts in POSTGRES

I would need to perform this kind of logic in a serializable way: account table has columns: 'accountName', 'location', 'worth', ... Assume no unique key exists. Some accounts are logically (according ...
GionJh's user avatar
  • 113
0 votes
1 answer
29 views

Can't export MariaDB large table by mysqldump when row_format is compressed

I have a MariaDB 10.2.13 server. This server contains a database called 'factory'. This database contains a table called 'client'. This is a large table. client table structure: CREATE TABLE `client` (...
user3637971's user avatar
0 votes
0 answers
18 views

Local SQL to Managed Cloud SQL via ADF. Copy Data throughput fell off a cliff

I have an on-site mini PC acting as a data extraction and replication SQL server that copies data nightly from the ERP production database that's running some legacy linux architecture. The copying is ...
funkyman50's user avatar
1 vote
0 answers
42 views

Force index not working in Aurora MySQL 8

I have recently upgraded to Aurora MySQL engine version 8.0.mysql_aurora.3.05.2 from Aurora MySQL 5.7. I see huge performance issue after upgrading. Recently I found that I have queries whose indexes ...
Ali Mehdi's user avatar
1 vote
0 answers
43 views

SQL script to run from batch jobs

I have a sql script that truncates the table and insert into database from a linked server.Since the server is SQL express I will need to use batch jobs to schedule the jobs. Below is a snippet of the ...
SQL_NoExpert's user avatar
  • 1,049
0 votes
1 answer
27 views

what to do when database is not synchronizing in availability groups?

I am using Jonathan Kehayias - Monitoring Availability Group Replica Synchronization SELECT ar.replica_server_name, adc.database_name, ag.name AS ag_name, drs.is_local, drs....
Marcello Miorelli's user avatar
1 vote
2 answers
40 views

Optimized conception for score table

I have a simple question yet I couldn't find a direct answer/explanation. Sorry if duplicate I want to build a score table for a small quiz game where users get questions and they can either be right ...
1000k's user avatar
  • 13
0 votes
0 answers
21 views

Unexpected ERROR 1556 (HY000) at line 45: You can't use locks with log tables

Trying to restore dump made by mariadbdump 11.2 by the same version of mariadb client, it drops at the attempt to lock the InnoDB table. -------------- LOCK TABLES `Component1` WRITE -------------- ...
AnrDaemon's user avatar
  • 101
-5 votes
0 answers
58 views

Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an xpression [closed]

ALTER PROCEDURE [dbo].[longrunning] AS SET NOCOUNT ON; DECLARE @xml NVARCHAR(MAX); DECLARE @body NVARCHAR(MAX); DECLARE @servername VARCHAR(20); DECLARE @subject VARCHAR(100); SELECT ...
S K's user avatar
  • 1
-5 votes
1 answer
36 views

list of users, logins ,permissions,account active ,last login date for SQL Server [closed]

can we get list of users, logins, permissions, account active, last login date in Query for SQL Server
dba_rs's user avatar
  • 1
0 votes
0 answers
23 views

Bitnami mongod fails with 'MongoServerSelectionError'

Bitnami's Mongo image launched under virtualbox works and brings up the text console (debian11 so no X11). Debian instance starts the listener correctly according to ss -atpn. But starting mongosh ...
ArrowInTree's user avatar
-1 votes
0 answers
27 views

Increase Report Performance using Materialized Views

In our Reconciliation Project, which performs operations on 4 million new transactions daily and stores them in a PostgreSQL database, we created reporting code in Python using materialized views. ...
Purushottam Nawale's user avatar
-1 votes
0 answers
40 views

What are some ways to manage High cxpacket waits followed by minimal latch_ex, sos_scheduler yield?

I have SQL server 2019 standard edition with 16 CPUs, 128GB RAM (max SQL memory), overall 176GB RAM, and SSD disks. CTFP is 50, and maxdop is 8. There is no cpu pressure in terms of worker threads. ...
variable's user avatar
  • 3,533
-1 votes
0 answers
45 views

Restore of database overwriting existing database even though `with replace` isn't set

SQL Server 2022, Standard Edition I have a database on one server (Server 1) called TestDb. I restored it on another server (Server 2) as TestDb_CORS. Users did some testing on the restored database, ...
variable's user avatar
  • 3,533
0 votes
0 answers
29 views

How do I fix a permission denied error when starting a MariaDB Galera node

I'm trying to spin up a galera cluster based on the official MariaDB 11.2 docker image. My dockerfile is below. When I start the node, I'm getting a permission denied error that is preventing the ...
CrossBound's user avatar
0 votes
1 answer
147 views

Why is restored database faster than original?

I ran this explain analyse in my PostgreSQL 13.7 database: explain(analyze, verbose, buffers, settings) select * from main_table; Seq Scan on public.main_table (cost=0.00..10246.15 rows=220715 width=...
Mapashito's user avatar
3 votes
2 answers
543 views

Is self signed cert the standard practice for SQL Server Always Encrypted?

We're implementing SQL Server Always Encrypted in our 2019 environment. We've done several successful POC's over the last few months, but in moving the solution to Prod, I was expecting to use a ...
Emo's user avatar
  • 143
1 vote
2 answers
106 views

Unexplained MySQL memory usage

I am experiencing an issue with MySQL memory usage increasing over time to a point where OOM Killer kills the MySQL process. I have 3 servers configured with Group Replication (1 Primary and 2 ...
O Genthe's user avatar
1 vote
0 answers
30 views

Why did this script stop working?

I am running the database via the mariadb:lts docker image. Initially the code executes some scripts that restore the database from a dump ).sql) file and then some files to alter the database for ...
KenDRhyD's user avatar
0 votes
0 answers
38 views

Why Reads in Log file are more than writes in SQLServer Database?

In my office environment, there are databases for which reads in log files are more than writes. The above screenshot represents 3x reads in log file compared to write in one of the database. This ...
Ajay Dwivedi's user avatar
0 votes
0 answers
30 views

What are the implications of changing SQL server VM from domain to workgroup?

We have Azure VM with SQL server 2019 installed, this is a standalone instance. I'm tasked with changing the membership of the VM from domain to workgroup. In other words taking the server out of the ...
variable's user avatar
  • 3,533
1 vote
1 answer
158 views

What are large files in Postgresql base directory

There are too many filenames start with T (T14_xxxxxxxx.1, T14_xxxxxxxx.2 .. T14_xxxxxxxx.18) in postgresql base directory for one database. The size of this database in base directory is 500GB with ...
Mustafa DOGRU's user avatar
0 votes
1 answer
22 views

Can a postgres autovacuum increase the TOAST size of the table?

A table toast size goes from 7.5Go to 9.2Go in one hour. The normal database activity seems not responsible for that: no more queries than usual. To be the cause, it would need a larger amount of ...
Slim's user avatar
  • 237
0 votes
0 answers
18 views

Is Microsoft SQL Managed Instance maximum backup file size still limited to 195 GB?

Is this 195 GB maximum strip size still accurate? https://learn.microsoft.com/en-us/sql/t-sql/statements/backup-transact-sql?view=azuresqldb-mi-current#limitations-for-sql-managed-instance. Microsoft ...
Rosdi Kasim's user avatar
0 votes
1 answer
37 views

sql bigger parameter then specyfied - no error - just taking substring? why?

I have some sql procedure (MSSQL 2019) if relevant Create PROCEDURE [dbo].[test] @tmp varchar(32) AS print @tmp why when i do EXEC @return_value = [dbo].[test] @tmp = N'...
Dorian's user avatar
  • 103
1 vote
0 answers
45 views

Views that were created in SQL Server 2008 R2 are encountering compatibility issues when re-created in SQL Server 2016 with identical definitions

We've created a view in 2008 R2. Provided below are the definitions for both the base table and the view. Base table: CREATE TABLE dbo.test( fcrecid char(25) NOT NULL, fctype char(1) NOT NULL, ...
Yashas's user avatar
  • 11
1 vote
1 answer
50 views

Why can I use double-quotes around "count" but not "least"?

I don't understand why these functions behave differently. The fact that they have a different arity shouldn't affect my ability to quote them. janus@janus-ux305ca ~ % psql psql (14.11 (Debian 14.11-1....
Janus Troelsen's user avatar
0 votes
1 answer
56 views

Restoring a SQL DB that had TDE turned on, cannot find certificate

I have SQLServer 2022 Developer on my machine. A customer has send me a SQLS 2019 backup file. When I attempt to restore it into a fresh DB, I get: Cannot find server certificate with thumbprint '...
Maury Markowitz's user avatar
0 votes
3 answers
169 views

Why Do Primary Keys on Temp Tables Improve Performance Much More Than On Table Variables?

Many of my reports are essentially pivot tables. I take a set of big tables and transform each table individually so that a particular column (let's call it CaseID) that wasn't a primary key in the ...
J. Mini's user avatar
  • 103
0 votes
2 answers
80 views

Need help on database design for 5 entities complex relations

What it is Have many stories (with many lines in each). Each translated in many languages. Each language have many accents. I'd want to offer user to choose the languages (can choose many of only ...
Md. A. Apu's user avatar
0 votes
1 answer
50 views

How to flush WAL files?

I'm trying to force WAL files to be flushed on to the disk so that I can copy them somewhere else. I believe CHECKPOINT is the command I'm interested in but it doesn't seem to work. I have a docker ...
dokgu's user avatar
  • 113
1 vote
1 answer
64 views

How to lock an entire Postgres database

I have a process (for backup and replication using binary logs) that works in MySQL that I want to replicate for Postgres databases (using WAL): Lock database (FLUSH TABLES WITH READ LOCK;) Disable ...
dokgu's user avatar
  • 113
0 votes
0 answers
147 views

SQL Server ASYNC_IO_NETWORK wait time for local BCP

This is my first ever question on dba.stackexchange. I am an experienced DBA, and I just changed company. My problem: On any SQLServer in this new shoppe, I find the output times really slow. I ...
YADBA's user avatar
  • 1
0 votes
1 answer
20 views

SQL AG with Synchronus Commits Latency Conerns same network but high transactions

We want to switch an SAP SQL database cluster to SQL Availability Groups. The plan is to have two replica servers in the same data center with synchronous commits, and one in the DR location with ...
Onlinerack's user avatar
0 votes
1 answer
46 views

Delete million of rows from parent and child tables in SQL Server

I have three tables: Records, ChildTable, and ParentTable. ChildTable and ParentTable both have RecordId as the foreign key. My aim is to delete all records older than 300 days from the Records table, ...
lifeisajourney's user avatar
0 votes
0 answers
43 views

Performce Problems on Parallel Seq Scan

I ran a SQL-Statement with the explain prefix on two databases. Testsystem: -> Nested Loop (cost=0.42..4841.28 rows=68 width=271) -> Parallel Seq Scan on table1_aud ...
ANPAS's user avatar
  • 1
0 votes
2 answers
60 views

Parallel Structures in database: One table with type field or multiple nearly identical tables

I'm designing a database where I'll have some data that has basically the same structure in multiple places, and I'm wondering if I should make it in 1 table or multiple. For example: I have an Apple, ...
user286116's user avatar
0 votes
1 answer
36 views

Aurora PostgreSQL TEMP TABLE creation taking more CPU than expected?

I'm running on an Aurora PostgreSQL on a db.x2g.2xlarge instance. Simply creating temporary table showed up as the third highest wait, which surprises me, as I expected it to be one of the lighest ...
Joe's user avatar
  • 1,635
1 vote
1 answer
25 views

Cassandra Read-Write Latency

INFO [HintsDispatcher:416] 2024-02-12 01:42:41,180 NoSpamLogger.java:91 - Maximum memory usage reached (536870912), cannot allocate chunk of 1048576 We are getting the above INFO in logs. Also, we ...
Cassandra Thrift's user avatar
0 votes
0 answers
26 views

How Does Time Sync Affect SQL Server AG Log Sync?

I'm overseeing an Always On Availability Group (AG) setup in SQL Server, configured with five servers. One server functions as the quorum disk, with the remaining servers designated as primary and ...
Ali varzeshi's user avatar
-1 votes
0 answers
56 views

sp_OAMethod is causing blocking with other normal Queries

I have been facing something new issue. SP_OAMethod is causing blocking with other normal queries. I have a procedure which includes select queries, and insert, update queries with begin transaction ...
dbajayy's user avatar
0 votes
1 answer
26 views

Insert in Table2 is not exist in Table2 but in Table 1

I have two tables. table1 (TABLE_HRD_CONTACTS_V01) Col_Primary_Key,Col_Call,COL_EMAIL table2 (TABLE_EMAIL) Col_Primary_Key,Col_Call,COL_EMAIL Both have more. The application adds to Table1. My code is ...
Kevin Roberts's user avatar
0 votes
1 answer
40 views

cancelling a query in local Postgresql

I have a hung query and cannot terminate it. I have tried the following to retrieve the pid: SELECT * FROM pg_stat_activity WHERE state = 'active'; I have tried cancelling it using the following, ...
MJM's user avatar
  • 125

15 30 50 per page