Newest Questions

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

Percona CREATE TABLE throws `ERROR 1062 (23000): Duplicate entry '4220' for key 'columns.PRIMARY'`

I just installed Percona over MySQL 8.0 on WSL Ubuntu 22. I made database gtm and I am trying to create a table inside it. mysql> show tables; Empty set (0.00 sec) mysql> CREATE TABLE employees ...
Brambor's user avatar
  • 101
0 votes
0 answers
22 views

Official example of `CREATE JSON DUALITY VIEW` gives syntax error

According to the release note of MySQL 9.4, JSON duality views are now supported. 27.7.1 JSON Duality View Syntax shows this example: CREATE TABLE customers ( id INT NOT NULL AUTO_INCREMENT ...
ynn's user avatar
  • 185
1 vote
2 answers
187 views

Attach a database using mdf and ldf files with an already existing FILESTREAM

I can't attach a SQL Server database using the .mdf and .ldf files; it is crucial for me because I need the latest transactions and the latest object modifications in it. What I have currently at hand ...
DevQt's user avatar
  • 205
0 votes
0 answers
49 views

Why does enabling Snapshot Isolation use up CPU?

I'm currently enabling Snapshot Isolation with ALTER DATABASE [MyDB] SET ALLOW_SNAPSHOT_ISOLATION ON;. It was taking longer that I expected, so I ran sp_WhoIsActive. I was surprised to discover that ...
J. Mini's user avatar
  • 1,267
2 votes
1 answer
123 views

Change Data Capture from SQL Server to a Postgres database

I want to get change data capture working using a SQL Server database as a source and PostgreSQL as a sink. +----------------+ +----------------+ +------------------+ | SQL Server | ---...
sav's user avatar
  • 233
0 votes
0 answers
23 views

MongoDB log rotation only happens on reboot, not daily as expected

I'm trying to use LogRotate to manage my MongoDB logs because they were growing too large. My goal is to: Create a new log file daily Compress old logs Keep logs for only the last 14 days Delete ...
Alaleh Hatami's user avatar
3 votes
3 answers
301 views

PostgreSQL Computed Date Timestamp Column

In PostgreSQL, I want to make a computed column, where end_datetime = start_datetime + minute_duration adding timestamps I keep getting error, how can I fix? ERROR: generation expression is not ...
mattsmith5's user avatar
14 votes
2 answers
497 views

On SQL 2022, DECLARE statement causes evaluation of database availability

Ok, this is a head scratcher for us. Hopefully someone out there can shed some light. This behaviour is only occurring on SQL 2022 for us -- and not on 2016, 2017 or 2019. Let's say we have a ...
Mike's user avatar
  • 892
0 votes
1 answer
16 views

postgres - log archive_command execution

we want to have a an entz in the postgres logs upon execution of the archive_command. Someone came up with this archive_command which should achieve this test ! -f /opt/db/backup/postgres/archives/%f &...
vrms's user avatar
  • 291
1 vote
2 answers
53 views

Dynamically Adjusting max server memory Between Two Instances

I’ve got one server with two SQL instances. The server has 128 GB RAM. Instance 1 has peak load from 08:00–10:00 Instance 2 has peak load from 14:00–17:00 Currently: Instance 1 has max server ...
Jonasstadi's user avatar
0 votes
0 answers
32 views

upgraded postgresql 14->17, my roles/databases didn't migrate, should unversioned directory be there

I upgraded 14 to 17 using steps I found at mattbrictson.com/blog/postgres-17-homebrew. brew install postgresql@17 brew services stop postgresql@14 $(brew --prefix)/opt/postgresql@17/bin/pg_upgrade \ ...
gknauth's user avatar
  • 223
1 vote
2 answers
65 views

Tuning UPSERT in PG14 w/ 130M records table

I'm tuning the server in order to speed up several SQL queries generated by a product and that can't be modified or tuned themselves. I'm stuck on a query that creates a CTO an then an INSERT / SELECT ...
Ivan Rododendro's user avatar
0 votes
0 answers
38 views

Slow DELETE due to FK trigger on partitioned child table

I'm working with PostgreSQL 15 and experimenting with table partitioning to improve performance. Original setup: I have two tables: tasks (parent) with ~65M rows and records (child) with ~200M ...
Cowabunga's user avatar
  • 145
0 votes
0 answers
22 views

AWS Aurora MySQL table archive running slow for one table

I'm working on archiving a bunch of tables in an environment where archiving was never done, with some data going back 10 years. I've written a script to perform the work, which loops through the ...
Swechsler's user avatar
  • 153
4 votes
1 answer
63 views

SQL Server Estimates don't use AVG_RANGE_ROWS for Uniqueidentifer Parameter

I'm trying to debug a very weird query row estimation. The query is very simple. I have a table OrderItems that contains for each Order (column OrderId) the items of the order. SELECT count(*) FROM ...
Jakube's user avatar
  • 141

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