Re: [GENERAL] Question about query optimization

2006-11-15 Thread Gurjeet Singh
On 11/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hello Gurjeet!   Tried your suggestion but this is just a marginal improvement. Our query needs 126 ms time, your query 110 ms. I do not see an index access on the component table Do you have an index on component.component_id?

Re: [GENERAL] Question about query optimization

2006-11-15 Thread Gurjeet Singh
On 11/15/06, Gurjeet Singh <[EMAIL PROTECTED]> wrote: On 11/15/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: Is there any other, and more performat way, to get the last history entryfor a given date than this query?  Create an (independent) index on history_timestamp column and use a min/max i

Re: [GENERAL] Question about query optimization

2006-11-15 Thread Matthias . Pitzl
Title: Nachricht Hello Gurjeet!   Tried your suggestion but this is just a marginal improvement. Our query needs 126 ms time, your query 110 ms.   Greetings, Matthias -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gurjeet SinghSent: Wednes

Re: [GENERAL] Question about query optimization

2006-11-15 Thread Gurjeet Singh
On 11/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Is there any other, and more performat way, to get the last history entryfor a given date than this query? Create an (independent) index on history_timestamp column and use a min/max in the subquery.More specifically, your query should look

[GENERAL] Question about query optimization

2006-11-15 Thread Matthias . Pitzl
Hello! I have to tables, component with unchanging component data and a component_history table containing the history of some other values that can change in time. The table component_history holds a foreign key to the component_id column in the component table. The table component_history has a