All Questions

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

Remove space and replace character with regexp_replace function

I wish : 1- remove spaces 2- delete apostrophes 3 replace the é and the è with e I use the function on potgresql: regexp_replace. For the moment, I can delete the spaces but poorly. Indeed, when the ...
fcka's user avatar
  • 113
0 votes
1 answer
14 views

SQL Server 2017 not recognizing Oracle driver for Linked server

I would like to connect from my SQL Server 2017 to an Oracle database via Linked server. I installed the Oracle driver from Oracle-Client-for-Microsoft-Tools-64-bit.exe, but the driver does not appear ...
Balazs Kiss's user avatar
-2 votes
0 answers
10 views

Ranking Users on all Subjects against a existing user

I have a table (called company_captions) with the state offices and Head office. They have all captions for each caption caption_subject, for example: Now the result I am looking for is. for a given ...
user290756's user avatar
-3 votes
1 answer
36 views

A better way to delete in batches with a temp table?

I'm trying to create a better logic for my delete. it's currently like this but it's bad, because it's adding everything in the teamp table, and when I run for 2, 3, 4 months, it will never end ( ...
Racer SQL's user avatar
  • 7,380
0 votes
1 answer
16 views

MySQL - Proper key length

I was looking at a table definition query from WordPress and noticed something strange. First of all, the query was this: CREATE TABLE $wpdb->comments ( comment_ID bigint(20) unsigned NOT NULL ...
Faye D.'s user avatar
  • 103
0 votes
0 answers
7 views

Generating PowerBI report URLs that include query strings automatically (instead of manually)

All of the documentation and examples I've seen thus far cover how to manually create a URL that includes filters using a query string. It seems programmatically trivial to generate a URL for the ...
Paul π's user avatar
  • 101
1 vote
1 answer
31 views

Why does MySQL choose such a poor query plan for "IN (SELECT NULL WHERE FALSE)"

We have some code that goes through a SQL generator to produce parameterized IN clauses of the form WHERE id IN (?, ?, ?, ...) AND .... If the list is empty, the generator cannot issue IN () since ...
ChaseMedallion's user avatar
0 votes
0 answers
15 views

Upon PC restart, MySQL service on local computer "started and then stopped"

I'm working in MySQL on a local (Windows) computer. I have a somewhat recurring issue I have with managing the server. I cannot replicate this error because I do not know what causes it. Sometimes, I'...
ZZ Top's user avatar
  • 1
-1 votes
0 answers
17 views

Unable to produce message using kafka client [closed]

I built kafka with all default values using helm chart still can't produce the messages - PS C:\Users\acharbha> helm -n my-kafka install my-kafka bitnami/kafka NAME: my-kafka LAST DEPLOYED: Fri May ...
unknown's user avatar
  • 92
1 vote
0 answers
4 views

How to stop losing control of a user I just created due to SYSTEM_USER privilege in MySQL

We have recently been plagued by users getting created with the SYSTEM_USER privilege by users who don't have that privilege. What do we need to do from a systematic perspective to stop this from ...
juacala's user avatar
  • 125
-1 votes
1 answer
18 views

How to create a proper post analytic system in PostgreSQL?

i'm a young self-thought web dev from morocco to cut the story short i'm working on a special social media project i learnt coding through but it developed into a bigger project over time. i reached a ...
Marwan Mason's user avatar
0 votes
0 answers
19 views

PostgreSQL 15 - changing the where clause gives a different execution plan - query takes longer

I am executing the following query on an alerts table to get the latest alerts based on the username. EXPLAIN ANALYZE SELECT * FROM alerts_alerts WHERE username IN ('<username_here>') ORDER BY ...
Razgriz's user avatar
  • 101
0 votes
1 answer
21 views

MariaDB Performance Degradation After Brief 20 Hour Massive Improvement

Problem On 2024-05-07 20:00:00 we migrated our DB from MariaDB 10.5 on an 8 core 16GB RAM server with a 10GB innodb buffer pool to a MariaDB 10.11 server with 16 cores 32GB RAM and a 20GB buffer pool ...
Joe Keilty's user avatar
0 votes
1 answer
29 views

Why is the cost for a Postgres query is so high if sequential scans are disabled?

Consider the following query: select distinct pnumber from project where pnumber in (select pnumber from project, department d, employee e where e.dno=d.dnumber and d.mgr_snn=ssn and e.lname='...
yousef elbrolosy's user avatar
-1 votes
0 answers
10 views

Slow PostgreSQL queries from Searchkick

I'm having to deal with a Rails application using Searchkick (https://github.com/ankane/searchkick) to make Elasticsearch queries. Some of these queries are very slow, e.g. 5-10 seconds. Once the IDs ...
knirirr's user avatar
  • 99
0 votes
0 answers
26 views

Connecting to SQL Server from externally with proxy server

I have a server running SQL Server 2022 with a couple of instances. There is the need to grant access to an external supplier working with us on a project. The idea is: the supplier connects to our ...
aganju82's user avatar
0 votes
2 answers
8 views

Bulk-loading snapshot, sstableloader returns "[table] doesn't exist"

I have about 60GB of data on a simple scylla cluster and I would like to migrate them to Cassandra 4.1.5. I have taken a snapshot on scylla with command nodetool snapshot -t scylla-20240524 --table &...
Ste's user avatar
  • 103
0 votes
1 answer
15 views

Passing contextual information to Postgres statements

To improve our insights on the health of some of our services, we've decided to improve our logging practices. One thing I've always wanted to explore was whether it's possible to easily correlate a ...
nicholaswmin's user avatar
-3 votes
0 answers
15 views

i want to use a mysql regexp to exclude a string [closed]

I want to use a mysql regexp to exclude a string "stg" something like this '(?!stg)
rakesh's user avatar
  • 1
-2 votes
0 answers
19 views

Como Crear una base de datos para un condominio? [closed]

¿Existe algún ejemplo de base de datos para gestionar un pequeño condominio? Utilizando SQL Server, con tablas para registrar información de cobros, gastos comunes, recibos a emitir y realizar ...
CREZ's user avatar
  • 1
0 votes
1 answer
32 views

SQL Server Failover Cluster Data Loss on failover

Currently running several databases on an Active/Passive SQL Server 2014 Failover Cluster on Windows Server 2012 R2. Recently there was an event that caused the active server to failover. The failover ...
David Gerst's user avatar
-2 votes
0 answers
17 views

PostgreSQL - simulating long-running queries via pg_sleep to test application

I am currently testing concurrency in my Python web application via threading as well as coroutines / asyncio. I have a synchronous SQL Alchemy ORM (v1.3) session set up. The session is set up per ...
Justin Lowen's user avatar
0 votes
0 answers
15 views

pgadmin connection to server error

I'm having a server-connection-error on pgadmin dashboard. I kept having a connection timeout error after prompting me to enter the password for user "postgres" after clicking on PostgreSQL ...
Alli Grace's user avatar
0 votes
0 answers
25 views

Azure SQL Managed Instance: 1. excessive initial compile times leading to app timeouts and 2. partition maintenance: long-running, bloats data file

We are having a couple of issues preventing us from going live with an on-prem SQL 2016 Std Ed to Azure SQL Managed Instance Business Critical tier re-platform, and I was wondering if anyone had ...
Mike Petrak's user avatar
0 votes
1 answer
28 views

SQL Agent Job failing after uninstall of SQLPS and install of the new module

Uninstalled the old PS module and replaced it with the new SQLServer but now third step of system job syspolicy_purge_history, which is a Powershell step, fails with the following message: The error ...
Stackoverflowuser's user avatar
2 votes
1 answer
21 views

Can we take a copy-only backup for filegroups on the SQL Server from a secondary HA replica?

I am getting the below error while executing the script for taking filegroup backups from a secondary replica. Msg 3059, Level 16, State 1, Line 18 This BACKUP or RESTORE command is not supported on ...
user avatar
-1 votes
1 answer
69 views

SQL join query without multiplying results

I've already got 2 select statements that create temp tables for Part A and Part B. Temp tables Part A Location 10001 A 10001 B 10001 C Part B Location 10001 Z 10001 Y I want it then to be ...
AJ Sadler's user avatar
3 votes
1 answer
76 views

Why is my SQL Server prefering to pick one plan over the other when there are 2 executions plans for the same query in the cache?

I have a 2019 SQL Server with a database with 'FORCE PARAMETERIZTION' set to true and a nightly job which does sp_updatestats on it. One of the application has a feature which has two modes, a "...
QFirstLast's user avatar
0 votes
0 answers
20 views

Additional Information Required During Requirements Analysis for Database Design

I am a student currently Studying in Financial Technology in Kitchener. so I have an academic assignment focused on database design, and I need some expert advice. As part of my assignment, I need to ...
nanda vihari's user avatar
3 votes
1 answer
79 views

PostgreSQL has stopped using index for large IN query?

I've got a large table (~2.2 billion rows), the table structure is basic: Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | ...
Zak123's user avatar
  • 133
1 vote
1 answer
19 views

Using custom table definitions in a multi statment table function

I have a custom type and a table, and I want to reuse this as a return result for several table functions. I want to declare the type rather than recreate the definition. So the start of the function ...
user1331548's user avatar
0 votes
0 answers
20 views

MySQL Exec_Master_Log_Pos is slow to update in replica compared to actual data

I'm trying to use Exec_Master_Log_Pos from SHOW REPLICA STATUS to check whether the replica is caught up to the master. However, Exec_Master_Log_Pos appears to take a while to update. When I add a row ...
Victor L's user avatar
  • 101
0 votes
0 answers
14 views

GridDB Array Type not showing in GridDB CLI

my GridDB container schema looks like this: class ConfigInfo { @RowKey String logtype; String file_path; Integer interval; Integer expiration_time; Integer partition_unit; ...
L. Connell's user avatar
0 votes
1 answer
14 views

Optimizing Cassandra Table Design for Queries Involving Two Partition Keys

I’m designing a Cassandra table and need advice on the best schema design to handle my query patterns efficiently. The primary queries are as follows: 90% of the queries involve both account_id and ...
Chillax's user avatar
  • 131
2 votes
2 answers
386 views

Why does Postgres consider pg_cancel_backend() as an error?

When a user aborts his request mid-flight, I sometimes cancel any read-only statements that support whatever read-only operation he was attempting at the time - I follow this pattern sparingly - ...
nicholaswmin's user avatar
0 votes
1 answer
22 views

how to verify mysql backup file using BlackHole

I'm interested in trying this solution: https://dba.stackexchange.com/a/44893/71052, also referenced here: https://dba.stackexchange.com/a/206151/71052 The problem I face is the following: mysqldump ...
fpierrat's user avatar
  • 111
1 vote
0 answers
20 views

PostGres DB is read only in pgAdmin despite successful migration into it

I have an old MS Access Database that I want to migrate to a Postgres Db hosted in a Docker environment on a Windows Server. I want to keep the MS Access Frontend, because it has some Forms and ...
lellek's user avatar
  • 11
5 votes
1 answer
108 views

Sampled Statistics Percentage Internal Calculation

When SQL Server builds sampled statistics, how is the sampling percentage calculated? For example, updating statistics on the PostId column of the dbo.Votes table in the Stack Overflow 2013 database: ...
Paul White's user avatar
  • 85.7k
0 votes
0 answers
44 views

Could not allocate space for object 'X'.'Y' in database 'Z' because the 'PRIMARY' filegroup is full

I have a limited primary data file(mdf) and an unlimited secondary data file(ndf) in the DBName database. These two data files are on different disks. I get the following error when the index ...
Merve's user avatar
  • 55
0 votes
1 answer
10 views

Existing data directory error in postgres installation

This message is what I've been getting while installing a new Postgres. I want the data to be stored in a new directory and not the existing one. An existing data directory has been found at C:\...
Alli Grace's user avatar
0 votes
1 answer
39 views

Handling duplicated data in SQL

I have a tables which are created and populated with millions of rows on a daily basis. There is no ID field, and rows are identified by the unique combination of field values. There is no possibility ...
Luke's user avatar
  • 349
0 votes
0 answers
13 views

Monitor delay for updating index on deletion

I'm aware than adding / removing data to a table that has one or more index can slow down the operation. However, I'm wondering how I could monitor that (on postgresql). When I delete data in one ...
poussma's user avatar
  • 101
0 votes
3 answers
28 views

Why is the Postgres query planner choosing the wrong strategy?

I have a Postgres/Postgis table with ~50M rows. I am making requests similar to this: select * from building b where ST_Intersects(b.point, some_fixed_geometry) order by id limit 20 offset X; The ...
Istopopoki's user avatar
0 votes
1 answer
25 views

What is the fastest way to insert a large amount of data into a partitioned table in postgresql?

I have a table, natively partitioned by date. The partitions encompass 1 month. I have another very large table (19GB), from which I want to copy data into the partitioned table. I have used ...
Halcyon Lykan's user avatar
-2 votes
0 answers
16 views

Python code get selected cell value in treeview Tkinter in python [closed]

sir I have successfully executed the code below, which provides me with the complete row data. However, I am now interested in obtaining the value of a specific selected cell. I would like Python to ...
mfahim's user avatar
  • 1
5 votes
2 answers
565 views

Indexed view - Cannot create index because "select list of the view contains an expression on result of aggregate function or grouping column."

I have a fairly simple view I'm trying to index. CREATE OR ALTER VIEW [schema].[IndexedView] WITH SCHEMABINDING AS SELECT SUM(ISNULL([Quantity], 0)) as [Quantity], [Address], [Asset], ...
deadwards's user avatar
  • 113
0 votes
0 answers
8 views

Azure Database for MySQL replication using GTID's

I have been testing the Azure Database for MySQL. I need to set up a replica in Azure with the Source database being on prem here. So far I have got a basic replica set up and running, but I need it ...
IGGt's user avatar
  • 2,126
1 vote
1 answer
16 views

Locks acquired during drop table (postgres)

I have a table A, that is referencing two other tables B and C. I would like to understand what's happening exactly when i am dropping A. When dropping A my understanding is that an access exclusive ...
Rémi Pradal's user avatar
0 votes
1 answer
58 views

Telling SQL Server about moving the backup files

I moved some backup files to new destination. However, the SQL Server seem to think they are still in their old place. (That is, when I use the SSMS Restore Database wizard, it it still comes up with ...
Yano_of_Queenscastle's user avatar
-1 votes
0 answers
29 views

invalid object 'users' [closed]

I don't think I'm in the wrong database as some solutions suggest (as there's only one) but I'm very lost and any help would be appreciated. Thank you. This is the sql script: CREATE TABLE users ( id ...
livia 2.0's user avatar

15 30 50 per page
1
2 3 4 5
2072