Postgresql 一年中最快的测试方式

Postgresql 一年中最快的测试方式,postgresql,Postgresql,我想检查DATE列中的值是否在2月29日,与年份无关?在Postgres中执行此检查的最快方法是什么?将日期和月份提取为数字: where extract(month from the_column) = 2 and extract(day from the_column) = 29 或者使用来\u char() 这两个表达式可能具有相同的性能,但它们都不能在_列上使用索引将日期和月份提取为数字: where extract(month from the_column) = 2 and

我想检查
DATE
列中的值是否在2月29日,与年份无关?在Postgres中执行此检查的最快方法是什么?

将日期和月份提取为数字:

where extract(month from the_column) = 2
  and extract(day from the_column) = 29
或者使用
来\u char()


这两个表达式可能具有相同的性能,但它们都不能在_列
上使用索引

将日期和月份提取为数字:

where extract(month from the_column) = 2
  and extract(day from the_column) = 29
或者使用
来\u char()

这两个表达式可能具有相同的性能,但它们都不能在_列上使用索引