It is a good practice to create an index for the most searchable fields in the model. In that way, the database search performance can be significantly increased.
However, should be careful not to add indexes on too many fields because the size of the database can rapidly increase. This means should be detected the most searchable fields and to create indexes only for them. More general info about database indexes can be found here, while a more depth overview of the PostgreSQL indexes can be found in their official documentation.
In Odoo, an index can be added to a particular field by setting up the index
attribute to True
in the field's definition.
Other possible values for the index
attribute are: btree
, btree_not_null
, trigram
and None
or False
which means no indexed field and it is the default value. More details for each of these values can be found in Odoo's documentation.
An example of adding index to the field sequence
in the PartnerContact
model is shown below:
There are few places online where you can do an overview of the system and try the different available apps.
The first place is the official Odoo website. Here you can create an account with 15 days trial period, during which you can try various modules that are part of the Odoo Enterprise edition.
Also the latest version of Odoo Enterprise is available at https://demo.odoo.com/ where a new database is created for temporary use and later removed. So next time when you visit the website a new database will be created, which means all your previous changes will not be available.
Another website where can be experienced different versions and editions of Odoo is https://runbot.odoo.com/. This environment offers all supported versions and the two different editions. However, since this is managed by Odoo only the official Odoo apps are available. The credentials for logging to any of these databases are admin/admin. Additionally, it is worth mentioning that these databases are available worldwide so all changes done in them are available for everyone.