All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
33 views

How i can get changes in DB postgresql without triggers

I have database, and in this database ~10 users changes rows, how i can get this changes and user who changed, without triggers. I tried read WAL, and there no info about who what change.
smdsa1337's user avatar
0 votes
1 answer
17 views

MongoDB: What cause bytesRead in insert operation?

Recently we had high CPU/Memory and I/O usage on our MongoDB. While checking the logs all I found is some insert during this period. While inspecting logs I noticed most of the insert logs have ...
Basil Titus's user avatar
3 votes
1 answer
330 views

What is the collation used while comparing Unicode string literals in SQL Server 2019?

My understanding is that the collation for comparing Unicode string literals is determined by the database collation. My database is using SQL_Latin1_General_CP1_CI_AS collation. When I compare N'ß' ...
QFirstLast's user avatar
0 votes
0 answers
23 views

Sqlcmd: The -W and the -y/-Y options are mutually exclusive

I am working on SQL server task. I need a sqlcmd result file with complete records with headers. Here is the command and error message below sqlcmd -S [Server_Name] -U [User_Name] -P [Password] -d [...
Yuvaraj's user avatar
3 votes
1 answer
138 views

Does automatic tuning revise the plan decision?

When automatic tuning is enabled, using SET AUTOMATIC_TUNING(FORCE_LAST_GOOD_PLAN), then based on query regression suppose SQL server auto decides to force a plan, then when does it revisit it's ...
variable's user avatar
  • 3,541
0 votes
1 answer
43 views

MySQL master-slave stopped replication no Error on relay log

MySQL Master stopped sending updates 1 day ago to Slave there is no obvious error. Everything was working fine I tried to create DB, and Users, no updates on Slave also SO far I tried to remove the ...
awd's user avatar
  • 1
2 votes
1 answer
17 views

postgres_fdw passes/does not pass the LIMIT clause to the remote destination

I'm making a FDW (Foreign Data Wrapper) in PostgreSQL for myself using C. And in the test environment below, myFDW receives the query with/without LIMIT clause case by case. Test environment: psql → ...
toratora7964's user avatar
0 votes
2 answers
34 views

Need help identifying opportunities for improvement in table config and query design

I am working on a project with a fairly large data set. We require arbitrary aggregates on this dataset, these are generated at request time from a user. Here is a basic description of our current ...
Kyle Chamberlin's user avatar
0 votes
0 answers
35 views

Why are my Laravel migrations (MySQL) so much faster in MacOS?

This is not so much of a problem as it's mostly just up to some hundreds of milliseconds of difference per migration; but I could not understand why my desktop [Windows 11] with I7-13700K, 64GB RAM, ...
Rick's user avatar
  • 113
0 votes
1 answer
13 views

Select distinct values from one table and join non matching values from second table to create new rows

I have two tables I'm trying to combine into one. They don't have a matching key besides the ID. I need to look up distinct value in table 1 (Zip) and add every value listed in table 2 (activity). All ...
J.R.'s user avatar
  • 5
0 votes
0 answers
29 views

SQL Server database migration issues

I have a system with two servers and three client workstations. Servers were configured to work as principal/mirror servers (mirroring was configured with certificates). I have two databases in SQL ...
Lamija37's user avatar
0 votes
2 answers
31 views

database design for a checklist app (units, inspections sheets, inspection questions)

I am working on a checklist app for inspection sheets for users on our shop floor. It's a paper process currently and they want to digitize it. I am using Postgres SQL for the database. I started out ...
ProfoundHypnotic's user avatar
0 votes
1 answer
27 views

Is It Normal to See Warnings in the Availability Group Dashboard for an Empty SQL Server Availability Group?

I've recently set up a new SQL Server Availability Group using T-SQL scripts. The setup was slightly unconventional as I initiated the availability group without including any databases initially. ...
Just a learner's user avatar
0 votes
0 answers
33 views

In a scalar function on SQL Server, is the only form of flow control via If...Else?

In a scalar valued user-defined function on SQL Server 2019, is the only form of flow control the If...Else block? Ideally I would rather use CASE...END, but everything I've found indicates this is ...
spinjector's user avatar
0 votes
1 answer
28 views

General approach for creating updated records with identical primary keys while preserving existing records

I am working with a database which has some records in it already, and I can't modify the existing tables although I can create new tables. I want to create new records which have the same primary ...
Robert Dodier's user avatar
0 votes
1 answer
19 views

How to migrate 2 different Cassandra databases into one cluster

We have two separate Cassandra clusters, each with six nodes: Cluster A and Cluster B. Our requirement is to merge these two clusters to save costs. Because this is a critical application, we need to ...
Sai's user avatar
  • 35
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
76 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
  • 135
1 vote
1 answer
26 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
69 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
  • 191
0 votes
0 answers
43 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
21 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
30 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
44 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
44 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
28 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
41 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
24 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
0 votes
0 answers
24 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
30 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
42 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,541
-1 votes
0 answers
48 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,541
0 votes
0 answers
31 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
153 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
550 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
118 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
41 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,541
1 vote
1 answer
160 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
23 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
62 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
181 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
  • 135

15 30 50 per page
1
3 4
5
6 7
2056