Subject RE: [ib-support] IBServer too slow wiht 600.000 record
Author KURSAT TASKIN
OOOO YESS!!!!
IT IS A GOOD IDEA,
I dont have index, and dit not gruoup by stokcode
thanks very much,
kursat

-----Original Message-----
From: lester@... [mailto:lester@...]
Sent: Thursday, December 13, 2001 3:50 PM
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] IBServer too slow wiht 600.000 record


> Hi, I am using latest version of firebird. I created a procedure in order
to
> calculate max, min, average stock prices of selected firms. I have 333
> different stock code and approximately 600.000 daily records. in my
> procedure, I am first selecting the code, then I am searching this code in
> the main database, select * from ... where ....code=:code_var
> then updating the table that contains unique stock codes and fields for
max,
> min and average prices. it calculates, but too slwo, approximatly 1/2
hour.
> is this possible or there is a fallacy with me.

Have you tried -

SELECT MAX(PRICE), MIN(PRICE), SUM(PRICE), COUNT(PRICE)
FROM XXX
WHERE CODE=:CODE_VAR
GROUP BY STOCKCODE

Have you got an index on STOCKCODE and on PRICE

( I think there is an AVR, but may be getting confused with
FastReport )

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services


To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/