News for hackers. Stuff that matters.
Re:PostgreSQL: Jsonb has committed by JohnBooty on Monday March 24, 2014 @08:40AM (#7457836)
This was a really informative post; thanks!

  If you use a dictionary for FTS (which you have to if 
  you need to support compounds), the dictionary has to 
  be loaded once per connection. Loading a 20MB dictionary
  takes about 0.5 
Does this happen for every connection, or just those that use FTS?

I'm thinking of a case where only maybe ~0.5% of queries will use FTS. I'm working on discussion software, and I'd like the discussions to be searchable, but realistically only a small percentage of queries will actually involve full text searching.

Re:PostgreSQL: Jsonb has committed by pilif on Monday March 24, 2014 @09:25AM (#7458047)
Only happens for connections that use FTS and only if you have configured it to use a dictionary (I believe there's no need to in case of an english body). But keep in mind that this means that you'll have to pay at least 0.5 seconds per search. If you do some google suggest style incremental searching on key press, you'll need to be faster than that.

So either use a persistent connection for full text searching (I'm connecting via pgbouncer for FTS-using connections) or, as karavelov recommended below, use http://pgxn.org/dist/shared_ispell/ which will load the dictionary once into shared memory (much less infrastructure needed for this one)

Re:PostgreSQL: Jsonb has committed by JohnBooty on Monday March 24, 2014 @02:40PM (#7460338)
Thanks so much for the tip, you saved me some hours for sure!