Subject | [firebird-support] Weird behaviour |
---|---|
Author | Martin Dew |
Post date | 2004-12-28T22:01:24Z |
FB 1.5
Delphi 5
BDE 5.2
I have some major speed issues at sites, they have a tracking screen
with a result set of 1000 records on it, I use a TwwQuery (Infopower)
hooked upto an Inforpower grid. With only a few records on the tracking
screen, if I select one to open it into a new form it is quick, with
lots of records on the tracking screen it opens the new form slowly. I
have tied the slowness down to being this procedure;
function TPatientData.IsLocked
(
URN : Integer
): Boolean;
begin
Result := True;
with PatientData.spIsLocked do begin
ParamByName('URN').AsInteger := URN;
ExecProc;
if ParamByName('Being_Used').AsString = 'Y' then
ShowMessage('This record is being used by another user')
else
Result := False;
end; // with
end;
the stored procedure is as follows;
CREATE PROCEDURE SP_LOCK_RECORD (
URN INTEGER
) RETURNS (
BEING_USED CHAR(1)
) AS
DECLARE VARIABLE BEING_EDITED char(1);
BEGIN
Select
Being_used
from
Log
Where
URN =:URN
Into
:Being_Used;
if (:Being_Used = "N") then begin
Update
LOG
Set
Being_used = "Y"
Where
URN = :URN;
end
END
The odd thing is that the underlying tables accessed through this
procedure are the same , regardless whether you have got 1000 or 1
records on the tracking screen, so I would expect this procedure to
return at the same rate irrespective of this.
I have tested this with only me on the site, no-other app open and it
definitely changes its response time depending on the amount of records
being displayed on in the tracking screen grid.
Can anyone shed any light ? I have had a system down due to it being
unbearably slow (typically at their busiest time of year) (hence why the
amount of calls on the tracking screen.).
Thanks for any help.
Martin
-----Original Message-----
From: Ivan Prenosil [mailto:Ivan.Prenosil@...]
Sent: 27 December 2004 13:14
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Firebird V1.5.2 has been released.
Ivan
Yahoo! Groups Links
Delphi 5
BDE 5.2
I have some major speed issues at sites, they have a tracking screen
with a result set of 1000 records on it, I use a TwwQuery (Infopower)
hooked upto an Inforpower grid. With only a few records on the tracking
screen, if I select one to open it into a new form it is quick, with
lots of records on the tracking screen it opens the new form slowly. I
have tied the slowness down to being this procedure;
function TPatientData.IsLocked
(
URN : Integer
): Boolean;
begin
Result := True;
with PatientData.spIsLocked do begin
ParamByName('URN').AsInteger := URN;
ExecProc;
if ParamByName('Being_Used').AsString = 'Y' then
ShowMessage('This record is being used by another user')
else
Result := False;
end; // with
end;
the stored procedure is as follows;
CREATE PROCEDURE SP_LOCK_RECORD (
URN INTEGER
) RETURNS (
BEING_USED CHAR(1)
) AS
DECLARE VARIABLE BEING_EDITED char(1);
BEGIN
Select
Being_used
from
Log
Where
URN =:URN
Into
:Being_Used;
if (:Being_Used = "N") then begin
Update
LOG
Set
Being_used = "Y"
Where
URN = :URN;
end
END
The odd thing is that the underlying tables accessed through this
procedure are the same , regardless whether you have got 1000 or 1
records on the tracking screen, so I would expect this procedure to
return at the same rate irrespective of this.
I have tested this with only me on the site, no-other app open and it
definitely changes its response time depending on the amount of records
being displayed on in the tracking screen grid.
Can anyone shed any light ? I have had a system down due to it being
unbearably slow (typically at their busiest time of year) (hence why the
amount of calls on the tracking screen.).
Thanks for any help.
Martin
-----Original Message-----
From: Ivan Prenosil [mailto:Ivan.Prenosil@...]
Sent: 27 December 2004 13:14
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Firebird V1.5.2 has been released.
> Firebird V1.5.2 for Linux and Windows has been released and isThe files are identical to V1.5.2 RC5, is it ok ?
> available for download.
>
> http://www.firebirdsql.org/index.php?op=files&id=engine
> http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_download_15
Ivan
Yahoo! Groups Links