Forum OpenACS Development: Re: acs_object_id_seq creation speed

Posted by Jeff Davis on
I did it in psql with output going to /dev/null.
time {db_nextval acs_object_id_seq} 1000
time {db_nextval t_acs_object_id_seq} 1000
shows db_nextval is 6.6ms per id for the sequence versus 13.4ms for the view but that's because it tries the sequence first and then if it does not exist it tries the view (i.e. 2 trips to the db). It should probably just cache which ones it needs to use the view for (then it would be about the same speed).