[firebird-support] Re: How to determine size of database structures?

2015-05-15 Thread brucedickin...@wp.pl [firebird-support]
Thank you Alexey. This is nice tool, however it does not show how much space is taken by given table and its indices... I am sure this can be deduced by reading gstat output file but I don't know how...

Re: [firebird-support] GBAK - validation error for column X, value *** null ***

2015-05-15 Thread Alexey Kovyazin a...@ib-aid.com [firebird-support]
Hi Josef, Such error is the consequence of the corruption - in the original database there was a NULL in the field (most likely, all fields in that record are NULL). gbak does not check constraints when reading. The best way to fix it is to find record with NULLs in the original database

[firebird-support] GBAK - validation error for column X, value *** null ***

2015-05-15 Thread Josef Kokeš j.ko...@apatykaservis.cz [firebird-support]
Hi! What would be a proper way of dealing with GBAK restore error 'validation error for column X, value *** null ***'? This error appears in one table, where X is the primary key. The database is Firebird 2.5.4 in the superserver mode. 1) How do I properly restore this backup? Neither

Re: [firebird-support] GBAK - validation error for column X, value *** null ***

2015-05-15 Thread Josef Kokeš j.ko...@apatykaservis.cz [firebird-support]
Hi! Thanks for the answer. Luckily, I still have the FDB file, so I can get rid of the bad records easily. What has me concerned is, what if I only had the backup? Your trick with pumping seems plausible, I will have to give it a try. IBBackupSurgeon looks promising, too. Josef On 15.5.2015

[firebird-support] Why index is not used in this query?

2015-05-15 Thread brucedickin...@wp.pl [firebird-support]
Hello, here is full example: CREATE TABLE TABLE_1 ( ID INTEGER NOT NULL, NAME VARCHAR(32), CONSTRAINT PK_TABLE_1 PRIMARY KEY (ID) ); GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE ON TABLE_1 TO SYSDBA WITH GRANT OPTION; CREATE TABLE TABLE_2 ( ID INTEGER NOT NULL,

Re: [firebird-support] Why index is not used in this query?

2015-05-15 Thread Tim Ward t...@telensa.com [firebird-support]
How about something along the lines of: A table that small is going to fit into a single disk page. So a table scan involves reading one disk page. Using the index would involve reading the index as well, which is a second disk page, so twice as slow. ? (Other RDBMS which have a covering

Re: [firebird-support] Why index is not used in this query?

2015-05-15 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On May 15, 2015, at 9:02 AM, brucedickin...@wp.pl [firebird-support] firebird-support@yahoogroups.com wrote: SELECT * FROM TABLE_2 T2 INNER JOIN TABLE_1 T1 ON T2.TABLE_1_ID = T1.ID After executing this query I am getting such plan: PLAN JOIN (T1 NATURAL, T2 INDEX

Re: [firebird-support] Re: How to determine size of database structures?

2015-05-15 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On May 15, 2015, at 2:14 AM, brucedickin...@wp.pl [firebird-support] firebird-support@yahoogroups.com wrote: This is nice tool, however it does not show how much space is taken by given table and its indices... I am sure this can be deduced by reading gstat output file but I don't

Re: [firebird-support] Re: How to determine size of database structures?

2015-05-15 Thread Alexey Kovyazin a...@ib-aid.com [firebird-support]
Hi Bruce, To view size of tables and indices you need to use our IBAnalyst tool (http://ib-aid.com/en/ibanalyst/). Regards, Alexey Kovyazin IBSurgeon Thank you Alexey. This is nice tool, however it does not show how much space is taken by given table and its indices... I am sure this

RE: [firebird-support] Why index is not used in this query?

2015-05-15 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
Bruce, SELECT * FROM TABLE_2 T2   INNER JOIN TABLE_1 T1  ON T2.TABLE_1_ID = T1.ID After executing this query I am getting such plan: PLAN JOIN (T1 NATURAL, T2 INDEX (FK_TABLE_2)) Why in case of TABLE_1 optimizer did not chose index PK_TABLE_1? Given that there is no ORDER BY clause