CARVIEW |
Select Language
HTTP/2 200
date: Wed, 23 Jul 2025 12:34:29 GMT
content-type: text/html; charset=utf-8
cf-ray: 963b3650eb2fc183-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=57262f71-b931-4360-bf00-cb3d4ca260ad; expires=Thu, 23 Jul 2026 12:34:28 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-frame-options: SAMEORIGIN
x-request-guid: db2dd2e2-7e12-4e59-952b-9583f22943cd
x-worker-origin-response-time: 439000000
x-dns-prefetch-control: off
set-cookie: prov=57262f71-b931-4360-bf00-cb3d4ca260ad; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=zXpXeevIqZkJm03e1pRA6O71QIS2DWdj5O8GUw5D1OE-1753274069-1.0.1.1-hN.i_kEuMdULw6QFasDslsHk.ohkd1IKVEPMP92Bg26uW55gw0WJw4ad4bzG_CMcrQ8L_9xKMF_pG0fjBwRfLNs7tJHcU9OsDBj2AnAB5wE; path=/; expires=Wed, 23-Jul-25 13:04:29 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=cVhJCNLnkRPvQMyuhtlVt7WUAlhVdIPKd2gYsYl4Rq4-1753274069109-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'query-performance' Questions - Database Administrators Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [query-performance]
For questions about improving the performance and/or efficiency of database queries.
3,495 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
60
views
What type of database should I use for this application?
I am currently designing a mobile application that sends push notifications to users subscribed to a set of topics. The list of possible topics changes infrequently (not more than once per year), ...
0
votes
0
answers
30
views
LIKE Operator optimization String % customer % [duplicate]
In MYSQL, I have a select query which is usually fetch the data from 4M records. There I'm using like operator with % and % this is not using indexing filter and reading total 4M records to fetch 2 ...
1
vote
1
answer
95
views
Query performance guidance
I am working on a query that is running for reports and causing timeouts as it tends to run right over 30 seconds. I feel the UDFs are causing the issue, but I am not sure what can get me a positive ...
-1
votes
0
answers
56
views
OPENJSON is evaluated as many times as filtered row count
I have some query generated by EF Core 9. EF uses OPENJSON function on MS SQL SERVER where you use Contains in EF Core query.
With generated query where OPENJSON is used in SUBQUERY The SQL Server ...
1
vote
0
answers
19
views
Oracle Parametrized Hibernate Queries
I am sending a parametrized named query in Java using Hibernate. Locally on app it is taking milliseconds and using Toad also.
While on uat api on app after calling the query, it is taking up to 5 min ...
0
votes
2
answers
83
views
What will be the root cause for the incident?
I’m facing a strange issue with PostgreSQL query performance. The same query runs in under 1 second during certain periods, but takes around 20 seconds at other times. However, the data volume and ...
2
votes
0
answers
25
views
How can I use multicolumn indexes to efficiently find the most recent record for EACH unique id (Postgres)? [duplicate]
I have a large temporal table (>20 million rows) that contains data over time on about 15k unique objects. I can't figure out how to efficiently query "get the most recent record for each ...
2
votes
0
answers
41
views
How can I speed up GIST index query for most similar n items?
I have the following tables and indices:
CREATE TABLE IF NOT EXISTS users
(
id NUMERIC(20, 0) NOT NULL DEFAULT NEXTVAL('users_sequence') PRIMARY KEY,
...
1
vote
1
answer
94
views
Creating efficient indexes on SQL Server with a big WHERE clause
I have a database that contains two tables, containing these columns (some irrelevant columns have been omitted):
Containers table
Id nvarchar(20) NOT NULL primary key, value generated before insert
...
1
vote
2
answers
132
views
Efficient approach for filtering, paging and sorting across multiple tables with multiple key columns
I have a query that retrieves data from a complex data structure involving multiple tables. The data can be filtered using a tree component that allows selection of different keys from different ...
0
votes
1
answer
46
views
Indexed Views added to database have increased Parse and Compile time dramatically
Recently, one of our development teams have added some indexed views based on some very commonly used tables. The problem we are getting now is that queries that used to execute quickly are taking a ...
2
votes
1
answer
316
views
the sql was slow with first time run in PostgreSQL 14
I have a SQL statement that runs slow the first time. The second time it will take only 6s and the first time will take more than 50s.
How can I reproduce my observations with the first run of the ...
1
vote
0
answers
57
views
Bitmap Index Scan slow performance in postgresql
I have a table that contains accumulated sales of many products over time. The schema is as follows:
CREATE TABLE IF NOT EXISTS public.accumulated_sales
(
id bigint NOT NULL,
sale_date ...
0
votes
1
answer
110
views
Postgres Query Slow 0.05% of the time
I have the following tables:
CREATE TABLE IF NOT EXISTS users
(
id NUMERIC(20, 0) NOT NULL DEFAULT NEXTVAL('users_sequence') PRIMARY KEY,
list_id ...
0
votes
0
answers
47
views
Drastically slower query after migrating from MySQL 5.7 to MySQL 8.4 — complex SELECT DISTINCT with multiple LEFT JOINs
I’m facing a performance issue after migrating from MySQL 5.7 to MySQL 8.4.
I have a query using multiple LEFT JOINs and a SELECT DISTINCT that used to run in ~300ms on MySQL 5.7. After migrating to ...
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
performance × 2440
sql-server × 1190
mysql × 946
postgresql × 740
optimization × 640
execution-plan × 378
index × 307
index-tuning × 167
performance-tuning × 157
join × 153
postgresql-performance × 152
database-design × 135
sql-server-2012 × 128
oracle × 127
query × 126
sql-server-2016 × 120
sql-server-2014 × 115
t-sql × 109
mariadb × 97
sql-server-2008-r2 × 88
subquery × 83
sql-server-2008 × 76
innodb × 67
azure-sql-database × 54
mysql-5.7 × 54
more related tags
Hot Network Questions
- Is a diet of one third Tuna ok for an eldery cat?
- Axioms of quantum mechanics - intuitive explanation
- Error when sending an email with attached PDF using Google Script
- Black color in Decal is not visible
- How can I grow kelp or seaweed at home in a small container?
- How to make peaks with thick lines pointy?
- How would a DiVicenzo machine prepare the maximally mixed state with a small number of ancilla qubits?
- What is the consistency strength of Russell & Whitehead's ‘Principia Mathematica’?
- How should a typical reward curve look like while training a RL model
- Is it rude to make someone an academic reference without getting their permission first?
- Etymology of the word skulduggery?
- Sum of ranks of blocks
- Business technical issues lead to unsuccessful payment being considered successful. Do I have any duty to notify?
- How do mechanical gyros maintain rotational speed?
- Why is this endgame winning for Black?
- Is buying random stocks and then selling off the ones that go down a good way to reduce capital gains tax?
- What does this "lightbulb-ish" symbol mean in figure 1 of the Diffie Hellmann paper?
- How to model This Twisted Torus?
- Mother in Law has overstayed her schengen visitor visa by 9 days. She is applying for the same visa this year, what should we take care of?
- What are these pastries pictured in the "Austria" article in the World Book Encyclopedia?
- SOSL/SOQL isn't returning User records
- Story about a room on Mars that contains God
- Manga/manhwa where protagonist is the only one summoned to a different other world
- Is there a way to retrieve my inventory from the void in Minecraft Java Edition?