title: Is there any way to track and kill a Postgres query in Zend framework
body: <p>I am working on a project using Zend Framework, PHP 5.3, and PostGres.  I have built a javascript front end that relies heavily on AJAX requests.  </p>
  
  <p>For instance, any time a user tries to add a new field( which is very common), a request is sent that triggers a long running query (5-10 seconds).  If the user adds 5 in a row, thats potentially 60 seconds to get the correct query value.   </p>
  
  <p>I would like to kill the current  AJAX request and DB Query every time a successive request is received. 
  Is there a means in Zend to track that query and kill it if a successive ajax request is received?</p>
  
  <p>To give you an idea of what I'm currently working with - </p>
  
  <pre><code> $db = Zend_Registry::get('database');
  $select = 'SELECT get_Query(' . $this-&gt;client_id  ')';
  $data = $db-&gt;query($select)-&gt;fetchAll();
  
  return $data;
  </code></pre>