On Wed, 12 Jul 2000, Tim Perdue wrote:
> "Ross J. Reedstrom" wrote:
> > Tim, why are you building a multikey index, especially one containing a
> > large text field? It's almost never a win to index a text field, unless
>
> This is not a key on a text field.
>
> The keys are:
>
> mail_list (example, the PHP mailing list=1)
> mail_year (1999)
> mail_month (July=7)
>
> Yes it is a multi-key index, and the matches are exact.
>
> Someone else asked why I have separated these fields out from the
> mail_date.
>
> If I didn't, and I wanted to see the messages for this month, I'd have
> to regex and that would overwhelm the database.
if you did it as a proper date field, you can use stuff like 'date_part'
and 'date_trunc' to pull out a particular month, year, etc ...