Re: using extended statistics to improve join estimates

From: Andy Fan <zhihuifan1213(at)163(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: using extended statistics to improve join estimates
Date: 2024-04-28 02:07:01
Message-ID: 87le4yjkvn.fsf@163.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Justin!

Justin Pryzby <pryzby(at)telsasoft(dot)com> writes:

> |../src/backend/statistics/extended_stats.c:3151:36: warning: ‘relid’ may be used uninitialized [-Wmaybe-uninitialized]
> | 3151 | if (var->varno != relid)
> | | ^
> |../src/backend/statistics/extended_stats.c:3104:33: note: ‘relid’ was declared here
> | 3104 | int relid;
> | | ^~~~~
> |[1016/1893] Compiling C object src/backend/postgres_lib.a.p/statistics_mcv.c.o
> |../src/backend/statistics/mcv.c: In function ‘mcv_combine_extended’:
> |../src/backend/statistics/mcv.c:2431:49: warning: declaration of ‘idx’ shadows a previous local [-Wshadow=compatible-local]

Thanks for the feedback, the warnning should be fixed in the lastest
revision and 's/estimiatedcluases/estimatedclauses/' typo error in the
commit message is not fixed since I have to regenerate all the commits
to fix that. We are still in dicussion stage and I think these impact is
pretty limited on dicussion.

> FYI, I also ran the patch with a $large number of reports without
> observing any errors or crashes.

Good to know that.

> I'll try to look harder at the next patch revision.

Thank you!

--
Best Regards
Andy Fan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andy Fan 2024-04-28 02:39:27 Re: a wrong index choose when statistics is out of date
Previous Message Andy Fan 2024-04-28 01:43:42 Re: using extended statistics to improve join estimates