Skip to main content
0 votes
2 answers
93 views

How to update by the other GROUPed table values effectively?

I have the tables Invoices (with No_ key) and the related InvoiceLines (with [Document No_] key that bounds to their invoices). The subset of invoice numbers is inserted into the table variable (no ...
pepr's user avatar
  • 21k
-3 votes
1 answer
52 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 = [ { &...
LEO_007's user avatar
  • 51
0 votes
1 answer
132 views

SQL query produced by Entity Framework very slow

I have the following query being generated by EF: DECLARE @__term_0 VARCHAR(7) = 'woodrow' DECLARE @__p_1 INT = 0 DECLARE @__p_2 INT = 15 SELECT [t].[Id], [t].[City], [t].[Contact], [t].[CreatedBy], [...
TheIronCheek's user avatar
  • 1,231
-1 votes
1 answer
160 views

Azure SQL S0 Tier – Slow Update Performance During Peak IoT Data Processing [closed]

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 ...
DJDJ's user avatar
  • 761
0 votes
2 answers
212 views

Why correlated scalar is 10x times slower in MySQL comparing to PG

Let's create a table with 3000 rows create table tt(id int, txt text); insert into tt with recursive r(id) as (select 1 union all select id + 1 from r where id < 3e3) select id, concat('name', id) ...
Slimboy Fat's user avatar
3 votes
1 answer
192 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 ...
Hugo Delsing's user avatar
  • 14.3k
4 votes
1 answer
164 views

Why does 'Index Seek' read 20 million rows for `select max(uk) from T where uk <= @x`?

In a table T with 20 million rows and a unique constraint on integer column uk, the following query induces SQL Server 2019 to perform a scan of all index entries instead of a single seek: select max(...
DarthGizka's user avatar
  • 4,825
1 vote
1 answer
88 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 ...
Armitige3's user avatar
-1 votes
0 answers
75 views

Timeout or Data not fetching in SQL Server [duplicate]

I have an ASP.NET Core MVC application with SQL Server, both the servers are hosted separately but in same VPC on AWS. Application runs smoothly and no connection timeout is received for the reporting ...
Diwakar Kumar's user avatar
2 votes
2 answers
177 views

MySQL: Writing better compound indexes

I recently came to know about the performance boosting capabilities of using compound indexes or composite keys in mysql through this question of mine Create multi table index/composite key. After ...
Mr.Singh's user avatar
  • 2,035
1 vote
0 answers
34 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 ...
Kaligule's user avatar
  • 830
1 vote
1 answer
68 views

SQL - Adding Union All on derived table subquery fetches all rows

Attempting to optimize a portion of a query that is joining two related tables, and getting odd results compared to other queries in the project with similar structures. Here is a very simplified ...
jdfr228's user avatar
  • 11
3 votes
1 answer
103 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 ...
Jan Mulder's user avatar
2 votes
2 answers
137 views

Query with aggregate functions is very slow

I have the following query: WITH RankedCallNotes AS ( SELECT Id, CreatedOn, CandidateId, Text, ROW_NUMBER() OVER (PARTITION BY CandidateId ORDER BY ...
TheIronCheek's user avatar
  • 1,231
0 votes
1 answer
82 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 ...
marie20's user avatar
  • 895

15 30 50 per page
1
2 3 4 5
…
730