Niko,

> Hello all,
>
> i am running a simple query where the result contains 3 records. The
> query should provide all records in a specific week.
>
> SELECT * FROM ARBEITSEINTEILUNG AS a where a.baustelle = '12345' AND
> WOCHE = '2015-41';
>
> Some times I dont have a week but two dates:
>
> In this case – the very same number of records = 3 is the result set I
> see that the table Arbeitseinteilung gots 42 reads.
>
> SELECT * FROM ARBEITSEINTEILUNG AS a where a.baustelle = '12345' AND
> a.DATUM >= '05.10.2015' AND a.DATUM <= '11.10.2015';
>
> How can I improve the query?

Hmm, what is the execution time for both queries?

42 isn't a lot. This might also include accessing system tables ...


-- 
With regards,
Thomas Steinmaurer
http://www.upscene.com/

Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.


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

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

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

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

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

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------

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:
    firebird-support-dig...@yahoogroups.com 
    firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    firebird-support-unsubscr...@yahoogroups.com

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

  • [firebird-supp... 'Parzival' parzival1...@gmx.at [firebird-support]
    • Re: [fire... Ann Harrison aharri...@ibphoenix.com [firebird-support]
      • AW: [... 'Parzival' parzival1...@gmx.at [firebird-support]
    • Re: [fire... Thomas Steinmaurer t...@iblogmanager.com [firebird-support]
      • AW: [... 'Parzival' parzival1...@gmx.at [firebird-support]
        • R... Thomas Steinmaurer t...@iblogmanager.com [firebird-support]
          • ... 'Parzival' parzival1...@gmx.at [firebird-support]
            • ... setysvar setys...@gmail.com [firebird-support]
            • ... Ann Harrison aharri...@ibphoenix.com [firebird-support]

Reply via email to