There are three separate indexes.
I reorganized my select command, and created stored procedures for them
instead of calling them directly. Here are my timing results:
ExecuteReader() takes about 0.02 seconds.
Read() takes 0.4 seconds which is really much.
However, when I run those queries from my program without using sp I get
these results:
ExecuteReader() takes 0.029 seconds.
Read() takes 0.026 seconds.
Why does it happen? I thought sp were faster. Can this be network issues?
Why is using built-in queries so fast compared to stored procedures?
Also can you tell me how to use SET PLAN? I am using FlameRobin.
Thanks.
On Wed, Oct 1, 2008 at 4:28 AM, Dean Harding <[EMAIL PROTECTED]>wrote:
> giorgi giorgi wrote:
> > 2. Yes, there are ascending indexes.
>
> Is it three separate indexes, or is it one index for all of them? The
> problem is your SQL statement, it's not the data provider.
>
> You can use the SET PLAN (or SET PLANONLY) commands in isql to work out
> which indexes (if any) the optimizer is choosing to use for your command.
>
> So my follow-up questions would be: What indexes are actually on the
> table? What does the output after using SET PLANONLY say?
>
> The things the other guys mentioned (creating one FbCommand and
> executing it multiple times rather than creating one FbCommand per
> execution) will help, but I think the bigger problem is in your
> database, not in your code.
>
> Dean.
>
>
> -------------------------------------------------------------------------
> This SF.Net <http://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
>
-------------------------------------------------------------------------
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