Search Postgresql Archives

Re: indexing large "text" attributes ... ERROR: maximum size is 8191

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Benjamin Arai <me@xxxxxxxxxxxxxxxx> writes:
> The tsearch2 webpage says to do something like

>          SELECT intindex, strTopic FROM tblmessages
>                  WHERE idxfti @@ to_tsquery('default', 'gettysburg &  
> address')
>                  AND strMessage ~* '.*men are created equal.*';
>           intindex |           strtopic
>          ----------+------------------------------
>                  6 | Gettysburg address quotation
>          (1 row)

Right.

> Which would mean I would have to create index on strMessage.  Right?

Wrong.  A btree index on strMessage is utterly worthless for checking
that pattern match, and even if it did work, there's no point in using
a second index to check it rather than fetching the heap entry.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux