[GENERAL] problems maintaining boolean columns in a large table

2010-02-09 Thread Ben Campbell
I've got a database that holds a bunch of articles in a table called 'article'. It has a bunch of columns, and each row might hold a few KB of data, say. I'm maintaining a separate fulltext database, and so I added a boolean flag, 'needs_indexing' to my 'article' table to keep track of which ar

Re: [GENERAL] problems maintaining boolean columns in a large table

2010-02-10 Thread Ben Campbell
Richard Huxton wrote: On 09/02/10 11:25, Ben Campbell wrote: [I was talking about moving a "needs_indexing" flag out of a big table into it's own table] But my gut feeling is that the flag would be better off in it's own table anyway, eg: CREATE TABLE needs_indexing

Re: [GENERAL] problems maintaining boolean columns in a large table

2010-02-11 Thread Ben Campbell
Timo Klecker wrote: could you post your trigger function? When you need to rebuild the index, you could disable the trigger setting the flag if the article is modified. This could speed up your UPDATE. Embarrassingly, when I checked, I found that I'd never gotten around to writing that particu