I have a table like pg_settings, so records have name and value.
This select is really fast, just 0.1 or 0.2 ms, but it runs millions of
times a day, so ...
Then all the time I have to select up to 10 of these records but the result
has to be a single record. So it can be done with ...
--Using CT
On Sat, May 20, 2023 at 4:43 PM Marcos Pegoraro wrote:
> I have a table like pg_settings, so records have name and value.
>
Hi. Maybe I'm missing something, but why aren't you simply doing:
select name, varvalue from sys_var where name = any($1)
and binding your 4 (in your examples) or 10
On Sat, May 20, 2023 at 9:43 AM Marcos Pegoraro wrote:
> I have a table like pg_settings, so records have name and value.
> This select is really fast, just 0.1 or 0.2 ms, but it runs millions of
> times a day, so ...
>
> Then all the time I have to select up to 10 of these records but the
> resu