CARVIEW |
Select Language
HTTP/2 200
date: Thu, 24 Jul 2025 01:52:10 GMT
content-type: text/html; charset=utf-8
cf-ray: 963fc6c92a939ac4-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=988a7dc3-6013-4703-8c01-844a67c0070a; expires=Fri, 24 Jul 2026 01:52:09 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-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: 18da5db3-25b1-46dc-8357-f7a64b50f76e
x-worker-origin-response-time: 989000000
x-dns-prefetch-control: off
set-cookie: prov=988a7dc3-6013-4703-8c01-844a67c0070a; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=iyWiHMAaop_FSOj0fe27y9MyGfwOx8ptGYbACmG93cE-1753321930-1.0.1.1-TUQ28rh_Mwh_kivA3rfR8l.ZLhcLNBUpMDTrDTIgqQAmTuCtIeoqQFwQj3VQ5XoZ3uCusQrzGdnEJPQ343nuQQAZ5BI4Cd.zEsm_bjzMg9I; path=/; expires=Thu, 24-Jul-25 02:22:10 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=95WfGeMHb0rfdHGS1gnhNSecZc87uXbea4woGg.v8Sk-1753321930142-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
64
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
31
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
57
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
317
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
- Etymology of the word skulduggery?
- Guitar Intonation - Flat On Certain Frets
- Processing All Files [0-9]*tex
- Why is this endgame winning for Black?
- Is it legal for businesses to give financial incentives for leaving positive reviews on review sites (e.g., Google Maps, Yelp, Facebook, Amazon)?
- Is there a smooth function approximating the minimum of a constant and a variable?
- Nontrivial bound for sum involving Möbius function and fractional parts
- What is that "T" in the pattern string of the date-command?
- Expected Sum of Remaining Dice After Removing Complete Sets
- What does this "lightbulb-ish" symbol mean in figure 1 of the Diffie Hellmann paper?
- How to expand an algebraic function like √R(x) into a continued fraction in Mathematica?
- Is buying random stocks and then selling off the ones that go down a good way to reduce capital gains tax?
- Render / Convert .midi / .mid to FLAC on Linux
- How to make peaks with thick lines pointy?
- Deployment fails with an error "Error (1): Unexpected end of JSON input"
- When is XLOOKUP() faster than VLOOKUP()?
- How to handle missing weather data (predictors) in production time series forecast with Prophet?
- When you view a historical event with an incorrect modern lens
- OId Movie about an alien city that plays a repeating melody
- Ubuntu Server installation -- options for boot disks are grayed out
- A soviet sci-fi novel (novelette?) with frogs?
- Do the constructible lines and circles (not merely their intersections) cover the plane?
- How can I automatically replace curly braces { and } in LaTeX macro arguments—e.g., in math formulas—for label generation?
- Does Philosophy Need Quotes?