Subject | Re: [firebird-support] Re: Query speed is going down |
---|---|
Author | Bogusław Brandys |
Post date | 2005-07-04T08:57:03Z |
Svein Erling Tysvćr wrote:
TOWARY and MAGAZYNY records and in this case this query has resonable
speed (a couple of seconds)
up however.
summarization.Seems no solution other then some kind of aggregation and
normalization of data.
Boguslaw Brandys
> Hi Boguslaw!Oh..Yes my mistake. That was plan for slighty modified query to limit
>
> I doubt you can improve your query much. Logically,
>
> Z.DATASPRZEDAZY BETWEEN '2005-02-01' AND '2005-02-01'
> AND ((Z.GODZINA BETWEEN 8 AND 8) OR Z.GODZINA=0))
>
> belongs in the WHERE clause and not in the JOIN clause, but that's the
> only thing I see that ought to be changed in the SQL and it shouldn't
> help solving your problem, because the plan seems just fine. Though
> wait a minute! Your plan mentions two tables (CM and CT) that are not
> in your query! Why???
TOWARY and MAGAZYNY records and in this case this query has resonable
speed (a couple of seconds)
> You could of course try to remove the GODZINA field from yourYes.But I tried WHERE P.ILOSC<>0 AND P.CSNETTO<>0. No significant speed
> SPRZEDAZ_IDX_DATA index, though my guess is that it would not improve
> the execution speed (though it is worth a try).
>
> I assume adding
>
> 'WHERE P.ILOSC > 0 [AND|OR] (P.CSNETTO > 0)'
>
> will change the result your query?
up however.
> I must admit that I will be surprised if the speed increases more thanWell, I'm quite sure now that it's related to big resultset returned for
> the range, I can understand that if one day takes 30 seconds, then one
> month will take 15 minutes, but if it increases more than that, then
> I'd say it ought to be investigated.
summarization.Seems no solution other then some kind of aggregation and
normalization of data.
> Sorry for not being able to be of more help,Your help is very valuable.Thank You.
> Set
Boguslaw Brandys