[firebird-support] Generator Performance

2011-09-23 Thread Matheus Degiovani
[Hello, The firebird manual says that generators are thread-safe [1]. How does the firebird engine guarantee that two consecutive executions of a "SELECT NEXT VALUE FOR..." do not return the same value? Does it use a lock on the RDB$GENERATOR table? Does the call to "SELECT NEXT VALUE..." bl

Re: [firebird-support] Generator Performance

2011-09-23 Thread Ann Harrison
On Fri, Sep 23, 2011 at 2:18 PM, Matheus Degiovani wrote: > > The firebird manual says that generators are thread-safe [1]. How does the > firebird engine guarantee that two consecutive executions of a "SELECT > NEXT VALUE FOR..." do not return the same value? Generator values are stored on gene

Re: [firebird-support] Generator Performance

2011-09-26 Thread Matheus Degiovani
Hello Ann, > > Generator values are stored on generator pages. In shared cache > architectures (i.e. SuperServer) a connection that changes a generator > value > gets a transient write lock on the page, makes its change and releases > the > page. This "page" is the mapping of a set of table

Re: [firebird-support] Generator Performance

2011-09-26 Thread Ann Harrison
Hello Matheus, > > > Generator values are stored on generator pages. In shared cache > > architectures (i.e. SuperServer) a connection that changes a generator > > value > > gets a transient write lock on the page, makes its change and releases > > the > > page. > > This "page" is the mapping of

Re: [firebird-support] Generator Performance

2011-09-27 Thread Norman Dunbar
On 26/09/11 17:06, Ann Harrison wrote: >> Is there a way of finding out how many pages are used to store a given >> table? Or documentation about how the mapping from tables to memory and >> disk pages are implemented on firebird? Maybe http://www.firebirdsql.org/file/documentation/reference_manu

Re: [firebird-support] Generator Performance

2011-09-27 Thread Alexey Kovyazin
Hello Matheus, >Is there a way of finding out how many pages are used to store a given table? Run gstat -r, there will be exact information - Data Pages: NNN CFG (149) Primary pointer page: 2736, Index root page: 2737 Average record length: 71.20, total records: 15549 Average v

Re: [firebird-support] Generator Performance

2011-09-27 Thread Ann Harrison
On Tue, Sep 27, 2011 at 3:39 AM, Alexey Kovyazin wrote: > > >Is there a way of finding out how many pages are used to store a given > table? > > Run gstat -r, there will be exact information Alexey is exactly right, but gstat reads every data page and counts the records and record versions on