Tom Lane escribió:
> Jeff Janes <jeff.ja...@gmail.com> writes:

> > The next quadratic behavior is in init_sequence.
> 
> Yeah, that's another place that is using a linear list that perhaps
> should be a hashtable.  OTOH, probably most sessions don't touch enough
> different sequences for that to be a win.

Could we use some adaptive mechanism here?  Say we use a list for the
first ten entries, and if an eleventh one comes in, we create a hash
table for that one and all subsequent ones.  All future calls would
have to examine both the list for the first few and then the hash table.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to