powa-team / pg_qualstats

A PostgreSQL extension for collecting statistics about predicates, helping find what indices are missing
Other
272 stars 26 forks source link

ERROR: there is no parameter $1 when i try execute the function. #52

Closed fernandorb10 closed 1 year ago

fernandorb10 commented 1 year ago

Hi. any idea for this error? thanks.

select find_usable_indexes(); NOTICE: relation "idxrecommendations" already exists, skipping ERROR: there is no parameter $1 LINE 1: ...SION tokensessi0 where tokensessi0_.SIGNATURE_ID=$1 and tok...

rjuju commented 1 year ago

Hi,

I don't know what "find_usable_indexes()" is, there's no such function in pg_qualstats. Whatever that function is, it seems that it needs to be taught about how pg_stat_statements normalizes queries or something like that.

rjuju commented 1 year ago

On a side note, if you're looking for an index advisor, pg_qualstats has one included since version 2.0.0.

See https://rjuju.github.io/postgresql/2020/01/06/pg_qualstats-2-global-index-advisor.html for more details on how it works.

fernandorb10 commented 1 year ago

Oh sorry, I had seen the function in a percona blog and thought it was specific to the extension.