2,609 questions
0
votes
1
answer
127
views
SQL CLR function bad performance comparing to .NET App
In our system we are hashing passwords with the following method.
public static string HashPassword(string password, byte[] salt)
{
if (salt == null)
{
throw new ArgumentNullException($...
4
votes
1
answer
102
views
How to aggregate hierarchical data efficiently in Django without causing N+1 queries?
I’m working with a hierarchical model structure in Django, where each level can represent a region, district, or village. The structure looks like this:
class Location(models.Model):
name = models....
0
votes
2
answers
222
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)
...
0
votes
1
answer
199
views
How to optimize slow TypeORM find() query with multiple nested relations in NestJS?
I am working in the backend of an application. One part of this application (like every application nowadays) is using AI for multiple things. The application's main purpose is building data warehouse ...
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 ...
0
votes
1
answer
79
views
"Query Targeting: Scanned Objects / Returned" Exceeding 1000 – How to Fix?
I'm using MongoDB Atlas and noticed a warning in the Performance Advisor and monitoring dashboard:
"Query Targeting: Scanned Objects / Returned" has gone above 1000
From my understanding, ...
0
votes
1
answer
42
views
mongodb compound index for $or query
For the following query, what indexes should I create
$match:{
"from_time": {
"$gte": "2024-12-17T18:00:00.000Z"
},
"to_time": ...
1
vote
1
answer
66
views
Is a localField $lookup faster than a pipeline?
In MongoDB (version 8) I'm wondering about the most read-efficient way of storing a "sharing mechanism". I.e. the users can share items with other items within the same collection.
When ...
1
vote
2
answers
60
views
Hibernate SQLServer batch update transaction lock resulting in extremely poor performance?
I have a table filemapping with over 140 million rows, and then commit a batch update (on, say, a million rows) with spring data like follows:
jdbcTemplate.batchUpdate("UPDATE filemapping SET ...
2
votes
0
answers
23
views
How to improve GridDB Memory Usage for Long-Running Queries?
I am using GridDB CE to handle time-series data and run long-running analytical queries. During these queries, I observe significant memory usage spikes that degrade performance or lead to errors. ...
0
votes
1
answer
96
views
Need help understanding why Spark query takes longer to execute when GROUP BY is introduced
I have 3 tables in an Oracle database which I am trying to join and run some aggregates on :
orders: (3000 + rows)
order_line_items: (5000 + rows)
items: (14 million rows)
When I run the following ...
0
votes
0
answers
138
views
Setting from UNLOGGED to LOGGED takes a long time
I am trying to load data with pictures stored in a BLOB column. Each picture is around 1MB in size. I have about 200K rows.
First try, I copy the table straight away. After about an hour, it stops and ...
0
votes
0
answers
169
views
Retrieve wait stats for an old query?
I know I can get wait stats about "current" queries via their SPID in sys.dm_exec_session_wait_stats but the SPID is recycled into new sessions.
Is there a way to query these stats for ...
3
votes
1
answer
476
views
What is the bottleneck of my postgres bulk insert?
I am bulk-inserting some data into a postgres DB on RDS, and it's taking longer than I would like.
A migration to initialise the DB schema would look like this:
CREATE TABLE "addresses" (&...
1
vote
1
answer
119
views
What impact has uniqueness constraint jsonb on postgres db performance
I'm designing a postgres database in which there is a table that has a jsonb type column. I would like this column to be unique. There is no need to have two objects with the exact same json ...
1
vote
1
answer
196
views
Slow insert using postgres foreign data wrapper
insert into my_foreign_table select * from my_local_table
My columns are two integers and two floats. The number of rows was >100M. I left it running for a few days, but killed it because it took ...
0
votes
1
answer
33
views
Filtering rows While Joining Two Tables(dataframes)
Currently I have 2 tables, lets say symbol_data and cve_data.
symbol_data is structured as below:
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 ...
1
vote
1
answer
84
views
Performance issues with recursive stored procedure for hierarchical data
I have a stored procedure GetCombinedRequestInfosByEmail that retrieves hierarchical data for employees. The procedure performs well for lower-level employees but takes around 55 seconds to execute ...
0
votes
1
answer
278
views
Why does PostgreSQL database size increase even though WAL limits or checkpoint are not hit
We use HammerDB/PostgreSQL for Hardware performance characterization. The PostgreSQL database is tuned to showcase the best hardware performance (checkpoint set to 1hr, min_wal_size as 256GB, ...
0
votes
1
answer
901
views
Read/write query routing in AWS Aurora Postgres
Is there a way or tool which can help route read and write queries to their respective instances in Aurora Postgres cluster, I got to know about ProxySQL but can it be used with Aurora Postgres?
1
vote
2
answers
916
views
MySQL Query result Fetch Time is way beyond than Execution Time, how to Solve this?
I am using MySQL 8.0.27-18, with InnoDB as engine. I have a huge database, with few tables containing 100M+ rows in them. For example: TABLE_A with 110M and TABLE_B with 300M+ rows. Sometimes I had to ...
6
votes
1
answer
307
views
Partial index on timestamp unused by the query planner despite matching period in WHERE clause
I'm working with a relatively large Postgres db containing several terabytes of data. It consists of data from 5 years back. As a result all the indexes are growing and therefore reducing the query ...
0
votes
1
answer
120
views
How to calculate hinted_handoff_throttle_in_kb to performance of hints handoff?
do you know if we have some formula to calculate hinted_handoff_throttle_in_kb to performance of hints handoff? I know that the number for this value is divided per number of nodes in the cluster, but ...
-1
votes
3
answers
9k
views
Temporary shutdown of autovacuum during rush hour [closed]
I have been asked to temporarily disable autovacuum in PostgreSQL 14.3. From 7 a.m. to 5 p.m., autovacuum is to be turned off, and at other times it is to be turned back on. I intend to achieve this ...
0
votes
2
answers
110
views
NodeJS MongoDB Taking Too Long to load and decompress a long list of Images
I have a nodeJS application with a mongoDB database and recently after uploading data into the images database, my api is starting to take 40+ seconds to load data. For some, even if I search through ...