OQL is a SQL-like language for querying objects and data in Geode. It allows querying on any object attributes and invoking methods. Indexes can significantly improve query performance and avoid scanning entire regions. Different types of indexes include functional, functional compact, key, hash, and map indexes. Partitioned and colocated regions can be queried using functions or equijoins with some restrictions. General tips include matching from clauses to indexes, ordering AND filters by selectivity, and using hints to prefer indexes.