title: Oracle Forms - how to speed up POST_QUERY trigger?
body: <p>This is code I'm dealing with:</p>
  
  <pre><code>declare
      --some cursors here
  
  begin
      if some_condition = 'N' then
          raise form_trigger_failure;
      end if;
  
      --some fetches here
  end;
  </code></pre>
  
  <p>It's from post-query trigger and basically my problem is that my block in Oracle forms returns 20k rows and post-query trigger is firing for each of the rows. Execution takes couple of minutes and I want to speed it up to couple of seconds. Data is validated in some_condition (it is a function, but it returns value really fast). If condition isn't met, then form_trigger_failure is raised. Is there any way to speed up this validation without changing the logic? (The same number of rows should be returned, this validation is important)</p>
  
  <p>I've tried to change block properties, but it didn't help me.
  Also, when I deleted whole if statement, data was returned really fast, but it wasn't validated and there were returned rows that shouldn't be visible.</p>