All Questions

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

SQL Database MaxSize higher than total drive capacity/space

I received a SQL database backup that I need to restore that is only about 1.5GB, but the MaxSize is several hundred GB. The PC/server that I need to process the data on this backup only has a 250GB ...
Jason Z's user avatar
0 votes
2 answers
42 views

How to improve query performance of filtered left outer join of big tables (40MM+ rows)

I hope you can help me optimize a query that joins two large tables in PostgreSQL. SELECT files.id, ARRAY_AGG(b.status) FROM files LEFT OUTER JOIN processing_tasks b ON (files.id = b.file_id AND b....
Jeff G's user avatar
  • 101
0 votes
0 answers
11 views

postgres 11->12 upgrade problems with pg_attrdef

Running into an issue upgrading a really old postgres server that started at v8 and is no v11. pg_restore: while PROCESSING TOC: pg_restore: from TOC entry 275; 1259 6116335 VIEW table_pk_seq postgres ...
Mike's user avatar
  • 175
0 votes
2 answers
12 views

MySQL 8- Add a Default Partition to a Table Partitioned on a Field Value

I have a table partitioned by values of a KPI field. There are some kpi with a large amount of rows some with small numbers. Partitioning by KPI name (string) keeps query performance good. The data ...
user avatar
-1 votes
2 answers
18 views

Mysql adding slave to a master->master

I have an existing MySQL database as master1 <-> master2 -> slave and I want to add another slave off master2. If I issue the FLUSH TABLES WITH READ LOCK; on master2 necessary to dump the db, ...
rwfitzy's user avatar
  • 99
0 votes
0 answers
18 views

How to get NTLM version authentication with select statement in SQL Server

From my using SSMS I connect to SQL Server 2019. I would like to know what authentication is my current session connection using. I executed SQL: select auth_scheme from sys....
folow's user avatar
  • 325
0 votes
0 answers
27 views

SSRS 2016 running slow with blocking

SSRS 2016 - Standard Default Settings. Work Horse for Reporting. Some large reports can run 5 hours+. Most reports cannot be optimized/tuned - 3rd party vendor. On occasion noticed procs "...
jay's user avatar
  • 21
0 votes
1 answer
33 views

Difference between Backup and Snapshot

I've been reading article after article about the difference between a Database Backup and a Snapshot and they just don't make any sense, so please help me undersand "A snapshot is an image of ...
Juan Perez's user avatar
0 votes
1 answer
11 views

PostgreSQL 16, pg_dumpall Restore

I'm trying to move a db from a server running PostreSQL 9.6 (CentOS) to another running PostgreSQL 16.1 (Ubuntu), I've used pg_dumpall with --clean (from the 16.1 install) to output the db's to a file ...
AStaUK's user avatar
  • 1
0 votes
2 answers
27 views

database design for tree structure with just one level

is it possible to design a database with a classic tree structure (no nested-set), forcing to have just 2 levels? the table I thought should be: id title parent_id 1 row NULL 2 child 1 3 ...
Giacomo M's user avatar
  • 129
0 votes
0 answers
23 views

Calculate target partition for UUID when hash partitioning in Postgres

I am using hash table partitioning in postgres v15. My partition key is a uuid. I want to be able to calculate the partition a uuid will go into so I can understand how changing my modulo will impact ...
bygrace's user avatar
  • 131
0 votes
1 answer
13 views

Reading data from PostgreSQL backup directory

Let's say I have a backup directory containing PostgreSQL data from some other system. By default, the data is stored at /var/lib/postgresql. After changing the default data directory to the path of ...
0xD4rky's user avatar
0 votes
0 answers
7 views

How to expand storage in Single node Elasticsearch

We need to increase storage capacity for Elasticsearch working on a Single CentOS node. Even if Elasticsearch support multiple path I don't think it's useful and they also suggest not to use it. Other ...
Basil Titus's user avatar
-1 votes
0 answers
16 views

What will be best datastructure to be used in redis if I want faster searching? [closed]

I have a usage case where I have to store a list of strings (max size 2520 bytes response) and finally, multiple remote clients will query multiple times (meaning a high burst of requests) to see if a ...
Ayush Gupta's user avatar
0 votes
1 answer
14 views

Which PostgreSQL replication solution(s) would work for me?

I have a python/django website with a PostgreSQL database. I need to set up replication so that: standby server will be on a different Linux box if the main server fails, the standby server can take ...
Granny Aching's user avatar
-1 votes
0 answers
15 views

File path. File not found [closed]

Hi anyone can help me here. so the problem is that the webapp can't find the file for example. if HelloWorld.txt is inside First_Folder, the file can be viewed. if HelloWorld.txt is inside ...
Ian's user avatar
  • 1
1 vote
0 answers
18 views

GridDB transactions failing, can't open, write, or delete from specific containers

I have a simple server and am testing out adding JSON Web Tokens for an upcoming project. I was testing protected routes and made dummy GridDB Containers to test whether my simple auth middleware was ...
L. Connell's user avatar
4 votes
1 answer
246 views

Postgres strange conversion of the string 'now' to timestamp

It looks like postgres treats the string 'now()' the same as a call to the now() function. Why does postgres allow this? select 'now'::timestamp; or this? select 'now()'::timestamp; or even this? ...
Christian Long's user avatar
0 votes
0 answers
19 views

Cassandra cluster upgrade 3.x -> 4.x fails with internode encryption = none

I have a Docker swarm cluster with 3 distinct Cassandra services (named cassandra7, cassandra8, cassandra9) running on 3 different servers. The 3 services are running the version 3.11.16, using the ...
Aldo's user avatar
  • 101
0 votes
1 answer
15 views

How to export as a pipe-delimited file using PowerShell?

This code creates a comma-separated file, I need to convert that to the pipe-delimited format. How to do that? $DataSet.Tables[0] | Export-csv "G:\Text.txt" -NoTypeInformation
Yulichka's user avatar
0 votes
1 answer
51 views

Cannot Connect (Internal connection fatal error. Error state: 15, Token : 23 (Microsoft.Data.SqlClient)

I had SQL Server 2019 Developer Edition installed and working correctly. Could access via SSMS without issue. About a month ago, I lost connection. Tried checking everything I could find online, no ...
jsp's user avatar
  • 1
0 votes
0 answers
19 views

Model a database for user subscription that can change during time

I'm struggling modeling a database. This is the domain: an user does have a subscription that has a start_date and a end_date an user can change its subscription, starting from a certain date (it can ...
Giacomo M's user avatar
  • 129
0 votes
1 answer
11 views

io.debezium.DebeziumException: Client requested master to start replication from impossible position

I am using Kafka and Debezium to connect to a MariaDB I have a problem where in the event the MariaDB loses power and shutsdown abruptly, on restart Debezium is no longer able to connect I have this ...
RedRum69's user avatar
-1 votes
1 answer
47 views

Automatically fetch USD Exchange Rate from API and Update it in Microsoft SQL Database

I want to update a table in a database but I can't even fetch the rate from the API. I get this error: Msg 39007, Level 16, State 2, Procedure sp_execute_external_script, Line 1 [Batch Start Line 0] ...
Luis Avalos's user avatar
0 votes
0 answers
40 views

How Do I create history table that allows me to retrieve the times when a row active by year & month?

I want to be able to retrieve the in-between months when a client was active but from a historical table. Table: DimensionEpisode episode_id client_id episode_status discharge_date admission_date ...
Sam Johnson's user avatar
0 votes
0 answers
6 views

Benefits of using pglogical 2.4.1 over Postgres 12 build-in logical replication?

I'm migrating a Postgres version 12.14 database. I've tested the migration twice: once using the pglogical extension 2.4.1 and once using Postgres' built-in logical replication. It seems like ...
trouble_bucket's user avatar
3 votes
1 answer
457 views

Why is SQL server dropping the seconds of values passed to a SMALLDATETIME field?

I'm using Microsoft SQL Server 2019 (RTM-CU22) (KB5027702) - 15.0.4322.2 (X64) Jul 27 2023 18:11:00 Copyright (C) 2019 Microsoft Corporation Express Edition (64-bit) on Windows 10 Pro 10.0 (Build ...
agerber85's user avatar
  • 111
0 votes
1 answer
38 views

Efficient PostgreSQL query syntax for duplicating the result

Assuming I have the following PostgreSQL query: SELECT ( SELECT SUM (t.customers) FILTER ( WHERE id = 1 AND date BETWEEN %(start)s AND %(stop)s ...
jvkloc's user avatar
  • 125
0 votes
1 answer
22 views

postgres trouble with systemd service not starting

we do custom installation of postgres on rhel. At present I installed 2 machines simultaeneously with Ansible (so they shoudl receive the exact same things) on rhel9 machines but fail starting ...
vrms's user avatar
  • 175
0 votes
0 answers
26 views

Always-On listener not working correctly

I have an Always-On architecture with two nodes and two AG. One of AG working correctly but other AG's listener only directs to the primary node. When I fail it to the secondary node, the application ...
mbielsa's user avatar
  • 42
0 votes
0 answers
5 views

Power Pivot/Data model issue

Good day, I am facing two blocking points where I would need your insights please. I have downloaded all my sheets in power query and made the necessary transformations, including creating a common ...
Maissa Oueslati's user avatar
0 votes
1 answer
24 views

What are "Cumulative Special Build" in fixpack download web page?

On our computers Db2 v11.5.8.0 Linux/x86-64 is installed. I would like to install new fixes as regular update, specially to deploy security fixes. Couple of weeks ago new fixpack 11.5.9.0 was released....
folow's user avatar
  • 325
0 votes
1 answer
69 views

How to allow predicate pushing on a view that uses group by

We have a table Ecom.McProductToVendorProductCodeMap that has a multi-field PK as shown: Then a view wraps that table to compute a metric and is grouped by the first two fields of that PK: ALTER view ...
crokusek's user avatar
  • 2,068
0 votes
0 answers
18 views

Duplicating (but not using) a materialized CTE makes the query perform as it should

I have a large query with many CTE's and joins, and once I changed the amount of data in the database (from 20k rows to 10k), it started performing horribly: https://explain.depesz.com/s/TSu3 ...
localhost's user avatar
  • 101
0 votes
1 answer
23 views

Validate "insert", "update", "delete" in the body of a trigger

I need to create a query where I can remove triggers that have "insert", "update" or "delete" in their body from the result. I'm using the following query for this SELECT ...
Igor Oliveira's user avatar
0 votes
0 answers
64 views

New SQL2022 slower than old SQL2014 server

I'm planning and testing a new SQL2022 install to migrate from an older SQL2014 database. I've noticed during performance testing some major discrepancies with some bulky queries. Here is a query I ...
JulioQc's user avatar
  • 123
0 votes
1 answer
59 views

How can I tell BCP to add headers to an output text file?

I am running this code; it only return data, how can I get headers in my file? EXECUTE master.dbo.xp_cmdshell 'bcp "SELECT * FROM table1 " queryout G:\Backup\Test.txt -t"|" -c -T ...
Yulichka's user avatar
0 votes
1 answer
23 views

Inversion of the string register

I'm using PostgreSQL and I have a table with serial numbers. The serial number is like this The serial number is like this zHOb55Klast, I want to make it like this ZhoB55kLAST. How can I do that?
JavaTech's user avatar
1 vote
1 answer
12 views

Sudden huge RAM usages with FireBird 4.0

Since about 2 weeks I have a sudden memory issue with 1 of our Firebird servers. For context: We have servers on 4 physical locations, each with a VM dedicated to Firebird and the connecting ERP pack. ...
Jeroen van der Weyde's user avatar
1 vote
0 answers
25 views

Which user executes Postgres RLS policies (CURRENT_USER vs VIEW owner)?

Postgres seems to have some weird semantics around which user is actually invoking check functions defined in RLS policies. Specifically, if the check function is SECURITY INVOKER, it appears that the ...
colophonemes's user avatar
0 votes
0 answers
10 views

Recover a database accidentally deleted in phpmyadmin

I have accidentally deleted a dztabase from phpmyadmin plateforme that had no backup copy anywhere. Is there any solution to bring back this database ?
user avatar
0 votes
0 answers
15 views

Are there any configuration flags you can set to make MongoDB start faster for integration tests?

We are running some integration tests that require MongoDB running. Unfortunately MongoDB takes about a minute to start on every run. Are there any flags or tricks that could be used to reduce the ...
tftd's user avatar
  • 101
0 votes
0 answers
30 views

Delayed 'Update' Message Insertion in MSSQL Broker: Troubleshooting and Resolution

I employ MSSQL 2019 triggers for 'insert,' 'update,' and 'delete' operations and utilizing MSSQL Broker to generate messages for consumption as audit messages. Each message triggers a specific row ...
Seyed Jafar Mousawi's user avatar
0 votes
1 answer
45 views

oracle pdb Relocation to new server

We plan to migrate the data (8 PDBS with at least 50 TB Data) of our old oracle server 19c to the new one (same version) and we must do this task with minimal or no downtime. For this reason we can ...
TimLer's user avatar
  • 161
0 votes
1 answer
48 views

mysql min with where clause optimization

I want to get min user_id for a tenant_id. mysql engine - innodb table - users(id, tenant_id, is_deleted, creation_date) pk (id) sk (tenant_id, creation_date) query1 select min(id) from users where ...
user3239193's user avatar
0 votes
0 answers
14 views

Oracle latch:shared pool waits causes application disconnection

I'm in need of help regarding some very weird behaviour on 1 of my production Oracle 19c database. This database was upgraded from 11g some time ago & after the upgrades the applications had been ...
Jason Oon's user avatar
0 votes
1 answer
42 views

History Logging Trigger Causing Duplication

I'm fairly certain I'm probably just overlooking something simple but here's the situation: I'm trying to create a "reusable" historical logging trigger for a production database. The intent ...
G_Hosa_Phat's user avatar
3 votes
5 answers
2k views

How to write an SQL query where the count of 2 different attributes is the same?

I created two different tables and then decided to put them (=) to each other however, what I am confused about is whether (=) is allowed to be used like that. I tried using IN but I didn't know where ...
sara khalil's user avatar
0 votes
0 answers
7 views

MaySQL InnoDB cluster log fill on one server

in my mysqld.cnf file, I enabled logging via the following general_log = 1 general_log_file = /var/log/mysql/mysql.log It is a three-node cluster. I can see all the queries in the log ...
orddie's user avatar
  • 1
0 votes
0 answers
89 views

Exporting data to INSERT INTO script using T-SQL [duplicate]

I need to export a table into a .sql script containing INSERT statements using T-SQL. There are many public posts about using SSMS and clicking on things. I must create something that can be scripted. ...
lit's user avatar
  • 231

15 30 50 per page
1
2 3 4 5
2039