Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Determining wea...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 15214 of 17602
Post > Topic >>

Determining weather a query fired a trigger

by Gordon <gordon.mcvey@[EMAIL PROTECTED] > Apr 8, 2008 at 07:03 AM

I'm adding full text search to a CMS project after we upgraded to 8.3
of Postgres.  I'd like to do a bit of testing before deploying it.

I added columns to the pertinent tables for storing tsvectors, and was
looking at my query code to update it so these columns get updated
where appropriate when I discovered triggers as a solution to let this
all happen in a way that's completely invisible and will require no
rewriting of the existing queries.  I set up triggers to fire on
insert or update to do the job and it all seems to work fine.

But I do have one concern regarding performance.  The tsvector only
needs to be updated if the title, summary, or keywords fields have
changed.  If they are the same after an update then there is no need
to run them.  Doing so would only cause a new tsvector to be generated
when it wasn't necessary.

So what I want to know is, is there a way to tell if executing a query
caused a trigger to fire?   I don't need anything fancy like notify
and listen, I just want to see what the database is doing for testing
purposes.  For example by looking at the logs and seeing what activity
was caused by a given query.  Does this stuff get logged?
 




 4 Posts in Topic:
Determining weather a query fired a trigger
Gordon <gordon.mcvey@[  2008-04-08 07:03:07 
Re: Determining weather a query fired a trigger
kleptog@[EMAIL PROTECTED]  2008-04-08 17:08:49 
Re: Determining weather a query fired a trigger
dev@[EMAIL PROTECTED] (R  2008-04-08 16:18:12 
Re: Determining weather a query fired a trigger
craig@[EMAIL PROTECTED]   2008-04-09 02:27:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 18:52:31 CST 2008.