Elasticsearch terms aggregations, which create buckets for unique values in a field, can experience slow performance due to factors like cluster misconfiguration and high cardinality, where fields contain numerous unique values. High cardinality can significantly impact performance, as it involves extensive computation of global ordinals, a data structure that numbers unique terms for efficiency. Techniques to mitigate these performance issues include using time-based indices to limit the need for recalculating global ordinals, enabling eager global ordinals to precompute data structures during refreshes, and opting not to build global ordinals at all by executing terms aggregations directly on raw terms, although this may increase memory consumption and reduce efficiency. Adjusting the refresh interval and tuning cluster settings can also enhance performance, and tools like Elasticsearch logs and the hot_threads API can help diagnose issues related to global ordinals.