Questions tagged [explain]
The EXPLAIN statement can be used to obtain information about the database executes a statement.
248 questions
0 votes
1 answer
74 views
MariaDB uses a unique index on one server, but not others
What makes MariaDB (10.6.22) use a unique index in queries on one server (production) but not on others (staging and dev, both of which are based on the production dumps). Namely I have a table ...
0 votes
1 answer
56 views
Different plan and slower query on smaller Postgres table
Running the same query on two tables that only differ in row count (~7.8M vs ~1.4M) results in two different plans, which sounds reasonable. But the execution on the smaller table is 4 to 5 times ...
0 votes
0 answers
55 views
Why does Postgres use filter instead of index scan when there are non-negligible number of null records?
This is my table: learning_postgres=# create table r(id serial primary key, x int not null, y int); CREATE TABLE learning_postgres=# create index r_x_btree_idx on r using btree (x); CREATE INDEX ...
0 votes
2 answers
148 views
How to correctly use a BRIN index in PostgreSQL?
My table is like this: CREATE TABLE IF NOT EXISTS public.ticks_a_2507 ( tick_time timestamp(6) with time zone NOT NULL, tick_nano smallint NOT NULL, trade_day date NOT NULL, -- other ...
1 vote
0 answers
88 views
Help understand why RLS significantly affects query performance
I have an RLS policy defined as: create policy read_contacts on contacts as permissive for select using (company_id = (current_setting('nimble.company_id'::text))::bytea); And such query: ...
0 votes
1 answer
98 views
Sqlite fetching speed problem - how to understand explain and compare two queries
I need to join two tables product_features and feature_text to get this output From a previous question i got two answers that both return the expected result for a small sample set: join so that ...
0 votes
0 answers
26 views
MongoDB - optimizing compound index by using executionStats
I am visiting the MongoDB learn DBA course. In one of the labs, it was shown how to optimize the compound index by examining the explain plan. The lab used the sample training dataset. Following query ...
0 votes
0 answers
99 views
Query performance degrade after upgrade from MySQLv5.6 to v5.7
I upgraded the MySQL Server from v5.6 to v5.7 and since then I see query performance degrade. For example, I have the following select query that selects some columns and has a single column in the ...