11,572 questions
0
votes
1
answer
125
views
Make MySQL evaluate subquery first
SELECT tt.trans_type_name AS transaction_type,
trans.transaction_time,
a.trans_action_name AS transaction_action_name,
trans.transaction_notes
FROM(SELECT Cast(...
3
votes
1
answer
92
views
Cause of and means to avoid "flat BNL join" in mariadb 10.11
I'm trying to help a user in another stackoverflow question and have bumped by head into a strange behaviour.
As I rarely use MariaDB, I'm opening another question to investigate the behaviour,
...
-1
votes
0
answers
160
views
Inserting rows into table with geometry column creating awful execution plan [closed]
I am seeding a database by copying over data from another database on the same server. In one of the tables, I am doing an INSERT INTO SELECT statement to bring over a few columns. While existing and ...
0
votes
1
answer
206
views
Make Postgres query fast without UNION
The ORDMBS is PostgreSQL 17.5 on x86_64-suse-linux-gnu, compiled by gcc (SUSE Linux) 7.5.0, 64-bit.
I have big table (about 150 GB), partitioned.
Full table description:
CREATE TABLE table_partition
(...
3
votes
0
answers
103
views
Azure Cosmos: MongoDB sharded cluster: $in query performance degrades with fewer values
I'm facing a counter-intuitive performance issue with my MongoDB sharded cluster where queries with fewer values in an $in clause are significantly slower than queries with more values.
The Issue:
...
-4
votes
1
answer
62
views
How to precompute nested date ranges efficiently to optimize range filtering and pagination? [closed]
📝 Body
I have a Mongo collection CollectionA where each top-level object contains a nested array of meetings now each meetings have start and end times, for example:
CollectionA = [
{
&...
-1
votes
2
answers
235
views
Azure SQL S0 Tier – Slow Update Performance During Peak IoT Data Processing
I'm using Azure SQL (Standard S0: 10 DTUs) to store data from various IoT devices.
Each IoT device sends messages to my Azure IoT Hub, which then triggers an Azure Function App. The Function App ...
3
votes
1
answer
202
views
Why does this query slow down this much over time
I'm testing with a very simple database queue to see how fast I can process it. At the moment without even doing anything else then just retrieving it from the queue.
A simple CTE query selects one ...
1
vote
1
answer
100
views
MySQL 8 runs very slow when including a NOT IN in the where clause
I have a website that displays on the main page the 12 latest uploads from the site's users. In that query, users can filter out uploads from certain other users (hence the NOT IN clause). Here is an ...
1
vote
0
answers
39
views
Multiple language labels in sparql query on wikidata
I want to query wikidata entities and their labels in multiple languages. But for some reason querying the labels is very inperformant.
My base query looks like this (find 3 life forms that have ...
3
votes
1
answer
115
views
What is the optimal BigQuery SQL query to group the same data multiple times over different groups?
I have a very large BigQuery table with web events that I want to aggregate into daily, weekly and monthly numbers of visitors. And I want to join them into the same table.
My initial guess is to do ...
0
votes
1
answer
99
views
Implementing CASE-WHEN or Aggregations in Materialized Views in BigQuery
I have the below mentioned BigQuery SQL for a View. However, both the tables used in the query are huge in volume and hence I am facing terrible performance issues.
If you'd glance at the query, I am ...
2
votes
2
answers
111
views
Mysql performance issues
we have some tough performance issues that seem to us that they shouldn't exist, but we don't see any way of solving them.
We have a Gcloud Mysql database, with 4Cpu, 16go Ram. The full instance ...
0
votes
1
answer
86
views
MySQL 8 slow queries on indexed table with WHERE event = ? AND merchant = ? AND created_at >=?
I’m troubleshooting slow queries on MySQL 8 and need advice.
I have a table salla_events (~1M rows). The queries look like this:
SELECT *
FROM salla_events
WHERE event = 'order.created'
AND ...
1
vote
3
answers
96
views
Insert value into mysql if this value isn't the latest value
As an example, imagine I want to log the outside temperature in a table. It is read every minute but changes only 20 times a day or so, hence I don't want useless entries every minute. A value shall ...
2
votes
2
answers
114
views
Optimize big MySQL table for faster MAX query latency
I have the following table in my MySQL DB:
CREATE TABLE messages (
id VARCHAR(36) NOT NULL PRIMARY KEY,
chat_id VARCHAR(36) NOT NULL,
author_id VARCHAR(36) NOT NULL,
content ...
2
votes
3
answers
102
views
MySQL index to use for range tests
I have this index:
create index main_cp_index on catalogue_product(
product_class_id, is_public,
(cast(coalesce(data->>'$."need_tags"', 0) as unsigned)) ASC);
When i'm trying to ...
4
votes
2
answers
165
views
Catastrophic query planning, non-use of index in MySQL 8+
I have a legacy Drupal 7 site that is used strictly internally. It's replacement is under active development, but in the meantime it is using Aurora2, MySQL 5.7 compatible and is in very expensive ...
5
votes
4
answers
224
views
How to speed up MySQL query containing LEFT JOIN and GROUP BY with 4M+ rows?
I have the tables "projects" (362K rows) and "projects_employees" (4.27M rows), one-to-many. I'm trying to get aggregated data for every employee and it takes 6-7 seconds. Is there ...
0
votes
1
answer
167
views
How to delete large number of records from a table faster in plsql?
Table #1:
buck number(10),
sname varchar(20),
...
total of 20 columns
Table #2:
sname varchar(20),
sdiv varchar(10),
...
total of 15 columns
Table1 has 30M rows
Table2 has 10M rows
I want to ...
1
vote
1
answer
61
views
Querying Many-to-Many relations in Prisma
I have following schema.prisma generated from existing db structure:
model accounts {
account_id Int @id(map: "accounts_pkey1") @default(autoincrement())
account_uid String @...
0
votes
3
answers
46
views
How to achieve target of 10KTPM in one minute using jmeter
I am working on one scenario where I have to check login flow of application for 10KTPM in minute.
In my login flow exist- load the URL, Login and Home page load.
In entire login flow we have 55 ...
1
vote
1
answer
115
views
MySQL 8 choosing sub-optimal indexing on large table despite suitable indexing
I'm working on a Laravel 12 project running MySQL 8.4. I have various models like Buyer, BuyerTier, Application and PingtreeGroup and I want to store raw transactional models in my PingtreeTransaction ...
1
vote
0
answers
62
views
Postgres sequential scan
I ran a query which was indexed in the JOINING column for all the Tables. But Postgres still prefers sequential scan
SELECT *
FROM ZHREPORTFILEHCSVIOLATIONMAPPER
JOIN ZHREPORTFILE ON ZHREPORTFILE....
0
votes
3
answers
143
views
How to query data from two tables with two foreign key columns referencing same primary key in the other table
I have two tables, A and B.
A has columns Id (pk), UserId, ...
B has columns Id (pk), SenderId (fk), ReceiverId (fk), ...
Both SenderId and ReceiverId reference the Id in table A.
Given UserId of ...