Re: [Firebird-net-provider] ExecuteReader is slow

2008-09-30 Thread Dean Harding
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

Re: [Firebird-net-provider] ExecuteReader is slow

2008-09-30 Thread Mercea Paul
Here is source code: FbCommand cmd = BuildCommand(DbCommand); cmd.Parameters.AddWithValue("@from", From); cmd.Parameters.AddWithValue("@to", To); cmd.Parameters.AddWithValue("@code", Code); try { cmd.Connection.Open(); //This needs 0.028 seconds. return cmd.ExecuteReader(CommandBehavior

Re: [Firebird-net-provider] ExecuteReader is slow

2008-09-30 Thread Jiri Cincura
On Tue, Sep 30, 2008 at 11:23 AM, giorgi giorgi <[EMAIL PROTECTED]> wrote: > This code is in a separate function and is called about 2000 times. To be true, this code is rubbish. Think about (at least) preparing your command, as Paul Mercea said. Maybe some better object handling and/or connection

Re: [Firebird-net-provider] ExecuteReader is slow

2008-09-30 Thread giorgi giorgi
Running a recursive cte against a table with about 1600 rows from my program needs the same time so I think it's providers issue. Here is source code: FbCommand cmd = BuildCommand(DbCommand); cmd.Parameters.AddWithValue("@from", From); cmd.Parameters.AddWithValue("@to", To); cmd.Parameters.AddWi

Re: [Firebird-net-provider] ExecuteReader is slow

2008-09-30 Thread CarliƱos
Hello: 1. I changed query but ut's the same. > 2. Yes, there are ascending indexes. > 3. Not very. The file is about 3Gb and op table has about 4,000,000 > records. > 4. Executing stored procedure takes the same time. According to profiler it > is Prepare method that takes most of the time. > 5. I

Re: [Firebird-net-provider] ExecuteReader is slow

2008-09-30 Thread Mercea Paul
From: giorgi giorgi [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2008 12:02 To: For users and developers of the Firebird .NET providers Subject: Re: [Firebird-net-provider] ExecuteReader is slow 1. I changed query but ut's the same. 2. Yes, there are ascending indexes. 3.

Re: [Firebird-net-provider] ExecuteReader is slow

2008-09-30 Thread giorgi giorgi
1. I changed query but ut's the same. 2. Yes, there are ascending indexes. 3. Not very. The file is about 3Gb and op table has about 4,000,000 records. 4. Executing stored procedure takes the same time. According to profiler it is Prepare method that takes most of the time. 5. IBExpert 2.0 seems to

Re: [Firebird-net-provider] ExecuteReader is slow

2008-09-30 Thread Steve Faleiro
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 >=

Re: [Firebird-net-provider] ExecuteReader is slow

2008-09-30 Thread giorgi giorgi
Well, it is fast if you call it once but for 2000 class it's about one minute. It's taking about 85% of the whole action. On Tue, Sep 30, 2008 at 11:16 AM, Steve Faleiro <[EMAIL PROTECTED]> wrote: > IMHO, 0.028 seconds seems to be pretty quick. That is 3/10ths of a > second. What were you expecti

Re: [Firebird-net-provider] ExecuteReader is slow

2008-09-30 Thread Steve Faleiro
IMHO, 0.028 seconds seems to be pretty quick. That is 3/10ths of a second. What were you expecting? --- giorgi giorgi <[EMAIL PROTECTED]> wrote: > Hello, > > I am using 2.1 version of firebird. Fb.NEt provider version is > 2.0.1.0Connection string looks like this: > "User=SYSDBA;Password=masterk