Subject Optimization help: is null and not null?
Author Harriv
Hi,

3rd party application is doing following query:

SELECT
  *
FROM
  V_MY_VIEW
WHERE
  V_MY_VIEW.HANDLED_TIMESTAMP IS NOT NULL AND
  V_MY_VIEW.RECEIPT_TIMESTAMP IS NULL

V_MY_VIEW is simple view with:

SELECT
  *
FROM
  MY_TABLE
WHERE
  STATUS > 0
.

This query doesn't return many rows (if any), but it takes a long time to run. Is there a way to optimize this?

I'm running Firebird 2.5.2