Jeremy Altavilla writes:
> We have several select statements whose performance is greatly improved by
> deleting some stats from pg_statistic.
You might have better results by setting up some "extended stats" for
the combination of bag_type columns that this query depends on. Per your
descriptio
Hi, Sergei
Thanks! I've just double checked and they are the same:
\d notice
id | bigint | | not null |
nextval('notice_id_seq'::regclass)
mbct_id| bigint | | |
\d news
id | bigint
Deepak,
I changed the datatype from citext to text and now everything works fine.
The data distribution is same, plan is same, yet there is a huge performance
degradation when citext is used instead of text.
However the business case requires case insensitive string handling.
I am looking forward
Hello,
We have several select statements whose performance is greatly improved by
deleting some stats from pg_statistic. With the stats present the database
reaches 100% cpu at 13k queries per second. Without these stats, the same
machine can handle over 29k queries per second. We were able rep
Hi
Please check datatypes in union all part. Possible, notice.id or notice.mbct_id
datatypes does not match with other tables.
regards, Sergei
Hi,
I am joining the union of three tables with another table. Postgresql uses
the index when only two tables are in the union. If I add one more table to
the union, it switches to seq scan. Apparently it also uses the index when
only one table is joined.
The SQL is:
select * from (
SELECT 'NEWS'