GORM is Grails' object relational mapping (ORM) implementation. Under the hood it uses Hibernate 3 (an extremely popular and flexible open source ORM solution) but because of the dynamic nature of Groovy, the fact that it supports both static and dynamic typing, and the convention of Grails there is less configuration involved in creating Grails domain classes.
I'll explain how to use hibernate to create and drop index statements for a domain class and add how to implement this logic as two new methods on the domain class.
I'm in the process of building a large database to load-test our application at work. Index usage and execution plans are quite different with many rows than with a few, so I'm creating millions of rows in tables for domain classes that will see a lot of activity to find missing indexes, inefficient queries, etc.
By default grails uses optimisic locking with versioning. In a nutshell this means that each of your domain objects is blessed with a version field and hibernate throws an exception if you ever try to update or lock an object with an old version number. For scenarios where you are happy to handle the exception, or just report the error to the user via a UI this is fine, however when this behaviour isn't ok you need to switch to pessimistic locking.