Use Triggers and generators (sequence) instead !
It provide more power, and we really do have unique id on all times (unlike some other rdbms'es … [mysql] ) </li></ul>
… Lies, damned lies, and statistics <ul><li>Firebird have statistics regarding the uniqueness of an index: </li><ul><li>Closer to 0, the data is more unique
Closer to 1, the data is less unique </li></ul><li>If the statistics is 0, then each data of the index is unique
If the statistics is 1, then redesign your index please, there is too much repetition of data
Recalculating index: </li></ul>SET STATISTICS INDEX <index name>;
… and they have a plan (?) <ul><li>Firebird also allow you to change how your query will be executed by using plan: </li></ul>SET PLANONLY ON ; SELECT a.emp_no, b.currency FROM employee a INNER JOIN country b ON a.job_country = b.country; PLAN JOIN (A NATURAL ,B INDEX (RDB$PRIMARY1)) SET PLANONLY OFF ;