You might want to add indices on the columns
STATUS, HANDLED_TIMESTAMP and RECEIPT_TIMESTAMP

Am 31.03.2014, 13:26 Uhr, schrieb Harriv <[email protected]>:

> 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


------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/firebird-support/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/

Reply via email to