> -----Original Message-----
> From: Steve Faleiro [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 30, 2008 11:29
> To: For users and developers of the Firebird .NET providers
> Subject: Re: [Firebird-net-provider] ExecuteReader is slow
> 
> 
> 1. Did you try to optimize the query?  I know Firebird has an optimizer
> that optimizes every query but sometimes a
> 
> Instead of:
> 
>  > "SELECT SUM(nsum), card FROM op WHERE
>  > smth >= @from AND smth<= @to AND
>  > bal = @code group by card"
> 
> Try:
> 
>  > "SELECT card, SUM(nsum)  FROM op WHERE
>  > smth >= @from AND smth<= @to AND
>  > bal = @code group by card"
> 

[PM] I would change this to

SELECT card, SUM(nsum)  FROM op 
WHERE (bal = @code) AND (smth between @from AND @to) 
group by card

Regards,
Paul



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to