[firebird-support] Getting count of records

2011-09-27 Thread firebirdsql
CREATE TABLE posts ( board_id, username, PRIMARY KEY (board_id, username) ) SELECT COUNT(*) FROM posts WHERE board_id = 1; There are 123k rows in the posts table (just a sample) and all of them are of board_id = 1. This query takes about 0.5-1 sec to run (slow). I'm guessing the performa

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

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 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