[firebird-support] Firebird 2.5 service turned off but client application is still working.

2017-01-20 Thread brucedickin...@wp.pl [firebird-support]
Hi guys,

We are using Firebird 2.5 Classic. Today during tests we have noticed that our 
application is still writing to the databse after the service has been turned 
off. No error has been returned. Is this a by design behaviour?

Thanks for your reply.
 



RE: [firebird-support] Do I need to "recompile" dependant stored procedure?

2016-03-24 Thread 'Wodzu' brucedickin...@wp.pl [firebird-support]
Thank you Ann for clarification.

 

I would have to dig in for example o that behavior, maybe it only seemed to me 
that this has occurred.

 

Best regards.

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, March 24, 2016 4:34 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Do I need to "recompile" dependant stored 
procedure?

 

  

On Thu, Mar 24, 2016 at 7:24 AM, brucedickin...@wp.pl 
  [firebird-support] 
 > 
wrote:



I have two procedures:

1. PROC_A
2. PROC_B - which is using internally PROC_A.

Now, I've made some changes in PROC_A, do I need to recompile PROC_B as well? 

 

That depends on what you've done to PROC_A.  Obviously, if you've changed its 
parameters,

then yes, you have to change and recompile PROC_B.

 

If so, what is the shortest way of doing it?

 

Again, it depends.  The easiest - brute force - way is to shutdown your server 
... or at least 

all connections to that database.  Compiled procedures are memory resident and 
go away on

database shutdown.  If not, I think ALTER is the only alternative.


I am pretty sure I've noticed some bad behaviour of PROC_B if I've left it 
without recompilation.

 

You shouldn't if there haven't been changes to the parameters of A.  If you do 
notice something,

you should report the symptoms and error messages.

 

Good luck,

 

Ann





[firebird-support] Do I need to "recompile" dependant stored procedure?

2016-03-24 Thread brucedickin...@wp.pl [firebird-support]
Hello,

I have two procedures:

1. PROC_A
2. PROC_B - which is using internally PROC_A.

Now, I've made some changes in PROC_A, do I need to recompile PROC_B as well? 
If so, what is the shortest way of doing it?

I am pretty sure I've noticed some bad behaviour of PROC_B if I've left it 
without recompilation. But the only way I know is to ALTER it and this is very 
inconvenient due to length of some procedures.

Thanks.
 



Re: [firebird-support] Re: Problems with connecting to Firebird 2.5.5 over TCP/IP on Linux (Ubuntu).

2016-02-25 Thread brucedickin...@wp.pl [firebird-support]
Thank you Mark.

For future poor souls that will spend hours trying to fix this, this post was 
helpful in configuration xinetd: Firebird News » Firebird Classic 2.5.x with 
xinetd on Ubuntu/Debian systems 
http://www.firebirdnews.org/firebird-classic-2-5-x-with-xinetd-on-ubuntudebian-systems/
 
 
 
http://www.firebirdnews.org/firebird-classic-2-5-x-with-xinetd-on-ubuntudebian-systems/
 
 
 Firebird News » Firebird Classic 2.5.x with xinetd o... 
http://www.firebirdnews.org/firebird-classic-2-5-x-with-xinetd-on-ubuntudebian-systems/
 By default Firebird Classic package uses openbsd-inetd You can inspect the 
config cat /etc/inetd.conf the max number of connections per minute is 255 
 
 
 
 View on www.firebirdnews.org 
http://www.firebirdnews.org/firebird-classic-2-5-x-with-xinetd-on-ubuntudebian-systems/
 
 Preview by Yahoo 
 
 
  


[firebird-support] Re: Problems with connecting to Firebird 2.5.5 over TCP/IP on Linux (Ubuntu).

2016-02-25 Thread brucedickin...@wp.pl [firebird-support]
@Mark I've tried 127.0.0.1 - the same error.
@Steve I've instaled xinetd (found some suggestions about that on stackoverflow)

I've run such command:

root@john-VirtualBox:/etc/init.d# netstat -an |grep 3050
tcp6   0  0 ::1:3050:::*LISTEN
unix  2  [ ACC ] STREAM LISTENING 33568@john 
com.canonical.Unity.Scope.applications.T16459610305087
unix  3  [ ] STREAM CONNECTED 33571
@john-com.canonical.Unity.Scope.applications.T16459610305087

So I guess 3050 is ok?

[firebird-support] Problems with connecting to Firebird 2.5.5 over TCP/IP on Linux (Ubuntu).

2016-02-25 Thread brucedickin...@wp.pl [firebird-support]
Hello guys,

could you be so kind and help me to diagnose problem with connecting to 
Firebird on Ubuntu? I do not have experience with linux (haven't touched it for 
years). Today I've installed Ubuntu on VM and installed Firebird classic using 
instructions from here: https://help.ubuntu.com/community/Firebird2.5 
https://help.ubuntu.com/community/Firebird2.5

 Unfortunately, I am getting such error: Statement failed, SQLSTATE = 08006 
Unable to complete network request to host "localhost". This error shows when I 
issue this command: 

 $ isql-fb
SQL> connect "localhost:/var/lib/firebird/2.5/data/employee.fdb " user 'SYSDBA' 
password 'masterkey';

However, when I issue the comand without "localhost:", such us:

$ isql-fb
SQL> connect "/var/lib/firebird/2.5/data/employee.fdb " user 'SYSDBA' password 
'masterkey'; I can connect to Firebird, so that means that something is wrong 
with my TCP/IP? How can I correct this?
 

 Could someone help me? 

 

 Thank you for your time.



[firebird-support] What is better: UPDATE or DELETE + INSERT?

2015-09-16 Thread brucedickin...@wp.pl [firebird-support]
Hello,

I need to rebuild some records in my database. I have to choices:

1. Firstly I delete set of records and then insert new ones.
2. I update the existing ones.

What solution is preferable? Will scenerio number 1. cause more garbage in 
database and decrease its performance?
 

 Thank you.



[firebird-support] Re: What is better: UPDATE or DELETE + INSERT?

2015-09-16 Thread brucedickin...@wp.pl [firebird-support]
Thank you guys.

You know, sometimes it is just easier to delete everything and recreate it once 
gain, from the algorithmic point of view. But if it is better (yes I have 
foreign keys and unique keys) to update things than i will make an extra effort 
to do it properly.

Re: Rif: [firebird-support] Re: Is it possible to use only part of the index?

2015-07-20 Thread brucedickin...@wp.pl [firebird-support]
So, if I change the order of fields in the index I can speed things up. Could 
someone explain me why it works like it works? What are the internals behind 
this?

[firebird-support] Is it possible to use only part of the index?

2015-07-17 Thread brucedickin...@wp.pl [firebird-support]
Hello guys,

today I've stumbled upon problem with performance. I have such table:

CREATE TABLE DETAILS_DATA
(
  ID_MASTER INTEGER NOT NULL,
  ID_PARAM INTEGER NOT NULL,
  PARAM_VALUE VARCHAR(64) NOT NULL
);
ALTER TABLE DETAILS_DATA ADD CONSTRAINT FK_DETAILS_DATA_ID_MASTER
  FOREIGN KEY (ID_MASTER) REFERENCES MASTER_DATA (ID);
CREATE UNIQUE INDEX UNQ_DETAILS_DATA ON DETAILS_DATA (ID_MASTER,ID_PARAM);

when performing this query:

SELECT
  DD.PARAM_VALUE
FROM
  DETAILS_DATA DD
WHERE
  DD.ID_PARAM = 60

only the NATURAL plan is used. I thought that index UNQ_DETAILS_DATA will be 
used.

I've tried to enforce a specific plan:

SELECT
  DD.PARAM_VALUE
FROM
  DETAILS_DATA DD
WHERE
  DD.ID_PARAM = 60
PLAN (DD INDEX(UNQ_DETAILS_DATA))

But I've got message index UNQ_DETAILS_DATA cannot be used in the specified 
plan.


FInally I did silly thing and joined this table with master table:

SELECT
  DD.PARAM_VALUE
FROM
  DETAILS_DATA DD
INNER JOIN 
  MASTER_DATA MD
ON
  DD.ID_MASTER = MD.ID
WHERE
  DD.ID_PARAM = 60 

And now index is used and the whole query is working 20 times faster.
Do I really need to include MASTER_DATA table to be able to use 
UNQ_DETAILS_DATA index?

Thank you.
 



[firebird-support] Re: general question: calculated fileds vs performance

2015-07-07 Thread brucedickin...@wp.pl [firebird-support]
If you do not notice any performance then do not worry ahead.
In case of any performance degradation you will easily switch to persistent 
column with trigger on INSERT/UPDATE.

[firebird-support] 450 active transactions after database restore, is it normal?

2015-07-02 Thread brucedickin...@wp.pl [firebird-support]
Hello,

here is the output from gstat.

Database header page information:
Flags0
Checksum12345
Generation500
Page size16384
ODS version11.2
Oldest transaction1
Oldest active2
Oldest snapshot2
Next transaction492
Bumped transaction1
Sequence number0
Next attachment ID2
Implementation ID16
Shadow count0
Page buffers0
Next header page0
Database dialect3
Creation dateJul 1, 2015 10:50:27
Attributesforce write

Variable header data:
Sweep interval:2
*END*

Gstat was started right after the restore. Is it normal to have so many active 
transactions right after the database restore?
 



[firebird-support] Re: Is this a bug or common behaviour? (conversion error from string )

2015-06-25 Thread brucedickin...@wp.pl [firebird-support]
Thanks Karol, 
I will make a test case and report it to bugtracker.

[firebird-support] Is this a bug or common behaviour? (conversion error from string )

2015-06-23 Thread brucedickin...@wp.pl [firebird-support]
Hello guys,

today I've stumbled on some strange (in my opinion) behaviour.

Firstly, create these two structures:

CREATE GLOBAL TEMPORARY TABLE GLB_CS_TEMP
(
  ID_MON_OBJECT INTEGER NOT NULL,
  ID_PARAM INTEGER NOT NULL,
  MEASUREMENT_DATE TIMESTAMP,
  PARAM_VALUE VARCHAR(64) DEFAULT '',
  CONSTRAINT PK_GLB_CS_TEMP PRIMARY KEY (ID_MON_OBJECT,ID_PARAM)
);

GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE
 ON GLB_CS_TEMP TO  SYSDBA WITH GRANT OPTION;

SET TERM ^ ;
CREATE PROCEDURE PROC_SPLIT_STRING (
P_STRING VARCHAR(32000),
P_SPLITTER CHAR(1) )
RETURNS (
PART VARCHAR(32000) )
AS
DECLARE VARIABLE LASTPOS INTEGER;
DECLARE VARIABLE NEXTPOS INTEGER;
BEGIN
  P_STRING = :P_STRING || :P_SPLITTER;
  LASTPOS = 1;
  NEXTPOS = POSITION(:P_SPLITTER, :P_STRING, LASTPOS);
  IF (LASTPOS = NEXTPOS) THEN
  BEGIN
PART = SUBSTRING(:P_STRING FROM :LASTPOS FOR :NEXTPOS - :LASTPOS);  
SUSPEND;
LASTPOS = :NEXTPOS + 1;
NEXTPOS = POSITION(:P_SPLITTER, :P_STRING, LASTPOS);
  END
  WHILE (:NEXTPOS  1) do
  BEGIN
PART = SUBSTRING(:P_STRING FROM :LASTPOS FOR :NEXTPOS - :LASTPOS);
LASTPOS = :NEXTPOS + 1;
NEXTPOS = POSITION(:P_SPLITTER, :P_STRING, LASTPOS);
SUSPEND;
  END
END
^
SET TERM ; ^

GRANT EXECUTE
 ON PROCEDURE PROC_SPLIT_STRING TO  SYSDBA;


Then run this query:

SELECT A.MO, A.PA, G.PARAM_VALUE
FROM
  (
SELECT 0 AS MO, CAST(PAR.PART AS INTEGER) AS PA
FROM PROC_SPLIT_STRING('', ',') PAR
WHERE PAR.PART  '' 
  
  ) A
  ,
GLB_CS_TEMP G 
  WHERE
A.MO=G.ID_MON_OBJECT AND A.PA = G.ID_PARAM 

You should get an error: conversion error from string 

Now change the WHERE condition and instead A.PA = G.ID_PARAM write A.PA = 
COALESCE(G.ID_PARAM,0)
and now it works!?

I do not understand why it is not working at the first place, GLB_CS_TEMP is 
empty, and the result from subquery A is also empty. Very strange, should I 
report this as a bug or is there an explanation for this?

Firebird version 2.5.4.26856

Thank you.
 



[firebird-support] Re: Firebird migration to increase perfomances

2015-06-21 Thread brucedickin...@wp.pl [firebird-support]
If application works very well then don't fix it if it ain't broken ;-) 

If you really want to then upgrade to 2.5.4 and make the test by yourself by 
executing most time consuming queries.

[firebird-support] Re: Why table of type key-value takes so much space on disk?

2015-06-11 Thread brucedickin...@wp.pl [firebird-support]
Thank you Dmitry.

Here are the results of gstat:

FLAT_DATA (290)
Primary pointer page: 5239142, Index root page: 5239147
Average record length: 213.90, total records: 8288203
Average version length: 0.00, total versions: 0, max versions: 0
Data pages: 533746, data page slots: 533746, average fill: 88%
Fill distribution:
 0 - 19% = 0
20 - 39% = 0
40 - 59% = 0
60 - 79% = 30
80 - 99% = 533716

DETAILS_DATA (262)
Primary pointer page: 842, Index root page: 843
Average record length: 20.19, total records: 164512578
Average version length: 0.00, total versions: 0, max versions: 0
Data pages: 2455600, data page slots: 2455600, average fill: 61%
Fill distribution:
 0 - 19% = 0
20 - 39% = 1
40 - 59% = 0
60 - 79% = 2455599
80 - 99% = 0

I guess this confirms your statement about record header size?

FLAT_DATA record length is 213.90 which is over 10 times more than DETAILS_DATA 
record length 20.19.
However in DETAILS_DATA we have 164512578 records which is 19.8 times more than 
in FLAT_DATA.

Best regards.

[firebird-support] Re: Why table of type key-value takes so much space on disk?

2015-06-09 Thread brucedickin...@wp.pl [firebird-support]
Really no answers apart from automatic spam message? ;-)

Please, help me to understand this...:)

[firebird-support] Why table of type key-value takes so much space on disk?

2015-06-04 Thread brucedickin...@wp.pl [firebird-support]
Hello,

could you please take a look at this table?


 CREATE TABLE DETAILS_DATA
(
  ID_MASTER INTEGER NOT NULL,
  ID_PARAM INTEGER NOT NULL,
  PARAM_VALUE VARCHAR(64) NOT NULL
);

ALTER TABLE DETAILS_DATA ADD CONSTRAINT FK_DETAILS_DATA_ID_MASTER
  FOREIGN KEY (ID_MASTER) REFERENCES MASTER_DATA (ID);
CREATE UNIQUE INDEX UNQ_DETAILS_DATA ON DETAILS_DATA (ID_MASTER,ID_PARAM);


 In this table I want to keep key-value data associated with some object 
(ID_MASTER) in master table. Currently I have 59 such parameters. Most of the 
time I am using only 2-5, so I thought that this structure will be ideal to 
save some space on the disk. 

 

 However, after running some tests I saw that database grows quickly. So for 
another test I create another table, this time I've included all keys in one 
row. Earlier I wrote that I have 59 parameters, so I needed to create 59 
columns. Here is the table:
 

 CREATE TABLE FLAT_DATA
(
  ID_MASTER INTEGER NOT NULL,
  P1 VARCHAR(64),
  P2 VARCHAR(64),
  P3 VARCHAR(64),
  -- P4..P57
  P58 VARCHAR(64),
  P59 VARCHAR(64)
);

ALTER TABLE FLAT_DATA ADD CONSTRAINT FK_FLAT_ID_MASTER
  FOREIGN KEY (ID_MASTER) REFERENCES MASTER_DATA (ID);

 

 I've put to this table exactly the same data that was in DETAILS_DATA table. 
Obviously, most of the P1-P59 columns were NULL.
 

 Here is the comparision of space taken by both tables:
 

DETAILS_DATA:FLAT_DATA:
Size of the table: 9592 MB Size of the 
table: 2084 MB
FK_DETAILS_DATA_ID_MASTER: 953 MB  FK_FLAT_ID_MASTER: 52 MB
UNQ_DETAILS_DATA: 1161 MB
TOTAL SPACE: 11706  MB TOTAL SPACE: 2136 MB
 






 As you can see DETAILS_DATA takes 5 times more of space. I was completely 
surprised by this result, after all I am not wasting space for 50+ columns. 
Could you explain me this phenomenon?

 






  Regards.


[firebird-support] An alternative for ASCII_CHAR() ?

2015-06-04 Thread brucedickin...@wp.pl [firebird-support]
Hello,

I need to produce delimited text output from my stored procedure, for example:

23;65;some text;

The thing is that semicolon ; might appear in one of the delimited fields and 
this will cause some bugs on the client side. So I want to change this 
character to a less common one. I've decided to use ASCII 7 - a Bell 
character. 

I am afraid that usage like this:

DECLARE V_OUTPUT VARCHAR(1024);
DECLARE V_PARAM VARCHAR(32);
...

V_OUTPUT = V_OUTPUT || ASCII_CHAR(7) || V_PARAM;

will slow down my query because I will be doing a lot of concatenations. 
Correct me if I am wrong but I think that even if I put this code into stored 
procedure, ASCII_CHAR(7) will not be resolved at compile time and will be 
called over and over again?

Is there other way to put my character directly into the query? For semicolon 
that was easy:

V_OUTPUT = V_OUTPUT || ';' || V_PARAM;

but how to do this with a Bell character?

Regards.
 



[firebird-support] Re: An alternative for ASCII_CHAR() ?

2015-06-04 Thread brucedickin...@wp.pl [firebird-support]
You might be able to use binary string literals:
 
 Mark

Perfect, thanks!




[firebird-support] Re: An alternative for ASCII_CHAR() ?

2015-06-04 Thread brucedickin...@wp.pl [firebird-support]

 

---In firebird-support@yahoogroups.com, helebor@... wrote :

 At 07:10 p.m. 4/06/2015, brucedickinson@... mailto:brucedickinson@... 
[firebird-support] wrote:
 
 
 Hello,
 
 I need to produce delimited text output from my stored procedure, for example:
 
 23;65;some text;
 
 The thing is that semicolon ; might appear in one of the delimited fields 
 and this will cause some bugs on the client side. So I want to change this 
 character to a less common one. I've decided to use ASCII 7 - a Bell 
 character. 
 
 I am afraid that usage like this:
 
 DECLARE V_OUTPUT VARCHAR(1024);
 DECLARE V_PARAM VARCHAR(32);
 ...
 
 V_OUTPUT = V_OUTPUT || ASCII_CHAR(7) || V_PARAM;
 
 will slow down my query because I will be doing a lot of concatenations. 
 Correct me if I am wrong but I think that even if I put this code into stored 
 procedure, ASCII_CHAR(7) will not be resolved at compile time and will be 
 called over and over again?
 
 Is there other way to put my character directly into the query? For semicolon 
 that was easy:
 
 V_OUTPUT = V_OUTPUT || ';' || V_PARAM;
 
 but how to do this with a Bell character?
 
 Just call the function once, in the declarations.
 
 Helen

Unfortunately, this won't help me that much because I need to call this block 
of code for each row and I have a lot of rows.

Regards.

  



[firebird-support] Re: How to CAST float to integer with error?

2015-05-26 Thread brucedickin...@wp.pl [firebird-support]
Thank you guys for your ideas, I will look onto them.

[firebird-support] How to CAST float to integer with error?

2015-05-25 Thread brucedickin...@wp.pl [firebird-support]
Hello,

is it possible by using CAST or in any other way to get database error when 
casting such number to integer?

SELECT CAST('13.245' AS INTEGER) FROM RDB$DATABASE

This gives 13 but instead I would like to get an error because precision is 
lost.

However, I would like to NOT get an error when doing this:

SELECT CAST('13.000' AS INTEGER) FROM RDB$DATABASE

Becasue here precision is not lost.

Is it possible to obtain such behaviour in easy way or do I have to use regular 
expressions?


Best regards.
 



[firebird-support] Re: Generator only seems to increment once...?

2015-05-18 Thread brucedickin...@wp.pl [firebird-support]
Hi Brian,

I would try to recreate this problem on Windows to check if this is a platform 
specific bug. Also, Lazarus forum is very actvite, I am sure that if you ask 
your question there, someone will help you.

Good luck.

[firebird-support] Re: Why index is not used in this query?

2015-05-17 Thread brucedickin...@wp.pl [firebird-support]
Thank you all for taking time to explain me this. Now I get it.

Regards :)

[firebird-support] Re: How to determine size of database structures?

2015-05-15 Thread brucedickin...@wp.pl [firebird-support]
Thank you Alexey.

This is nice tool, however it does not show how much space is taken by given 
table and its indices... I am sure this can be deduced by reading gstat output 
file but I don't know how...

[firebird-support] Why index is not used in this query?

2015-05-15 Thread brucedickin...@wp.pl [firebird-support]
Hello,
 

 here is full example:
 

 CREATE TABLE TABLE_1
(
  ID INTEGER NOT NULL,
  NAME VARCHAR(32),
  CONSTRAINT PK_TABLE_1 PRIMARY KEY (ID)
);

GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE
 ON TABLE_1 TO  SYSDBA WITH GRANT OPTION;
 
CREATE TABLE TABLE_2
(
  ID INTEGER NOT NULL,
  TABLE_1_ID INTEGER
);

ALTER TABLE TABLE_2 ADD CONSTRAINT FK_TABLE_2
  FOREIGN KEY (TABLE_1_ID) REFERENCES TABLE_1 (ID);
GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE
 ON TABLE_2 TO  SYSDBA WITH GRANT OPTION;


INSERT INTO TABLE_1 VALUES(1, 'V_1');
INSERT INTO TABLE_1 VALUES(2, 'V_2');
INSERT INTO TABLE_1 VALUES(3, 'V_3');
INSERT INTO TABLE_1 VALUES(4, 'V_4');
INSERT INTO TABLE_1 VALUES(5, 'V_5');

INSERT INTO TABLE_2 VALUES(1, 1);
INSERT INTO TABLE_2 VALUES(2, 1);
INSERT INTO TABLE_2 VALUES(3, 2);
INSERT INTO TABLE_2 VALUES(4, 2);
INSERT INTO TABLE_2 VALUES(5, 3);

SELECT * FROM 

 TABLE_2 T2
  INNER JOIN
TABLE_1 T1
  ON
 T2.TABLE_1_ID = T1.ID

After executing this query I am getting such plan:
 

 PLAN JOIN (T1 NATURAL, T2 INDEX (FK_TABLE_2))
 

 Why in case of TABLE_1 optimizer did not chose index PK_TABLE_1? And why I am 
getting error when i try to enforce it with: 
PLAN JOIN (T1 INDEX (PK_TABLE_1), T2 INDEX (FK_TABLE_2))
 

 Thanks for any clues.

 



[firebird-support] Re: Can I run GSTAT over a local network?

2015-05-14 Thread brucedickin...@wp.pl [firebird-support]
Thank you Mark, I did not know that this is possible.

[firebird-support] How to determine size of database structures?

2015-05-14 Thread brucedickin...@wp.pl [firebird-support]
Hi guys.

I know that I need to use gstat, and I know that I have detailed description 
about it here: Gstat Examples And Interpretation 
http://www.firebirdsql.org/manual/gstat-example-header.html 
 
 http://www.firebirdsql.org/manual/gstat-example-header.html 
 
 Gstat Examples And Interpretation 
http://www.firebirdsql.org/manual/gstat-example-header.html Gstat Examples And 
Interpretation Database Header Analyse Entire Database Analyse Data Pages Only 
Analyse Index Pages Only Selecting T...
 
 
 
 View on www.firebirdsql.org 
http://www.firebirdsql.org/manual/gstat-example-header.html 
 Preview by Yahoo 
 
 
  

However, the description does not say how to determine how much space on hard 
drive is taken by tables and indices. Somewhere I've read that to calculate 
size of a table I need to multiply the DB page size with data pages reported by 
gstat for each table. Is that a correct method?

Could you tell me how to calculate how much space is taken by indicies based on 
gstat output file? 

Regards.
 



[firebird-support] Re: How to determine size of database structures?

2015-05-14 Thread brucedickin...@wp.pl [firebird-support]
I've tried to also count leaf buckets * page size but still after summing up 
everything I am getting 11 GB instead of 21 GB.

[firebird-support] Can I run GSTAT over a local network?

2015-05-13 Thread brucedickin...@wp.pl [firebird-support]
Hi,

I am trying such command:

gstat.exe 10.10.3.2:/Base/2534/2534.FDB -p password -u user -d

But I am getting an error that specified patch could not be find. I am guessing 
that I can not run gstat over a network?

Regards.
 



[firebird-support] Re: Is it possible to do this with window function?

2015-05-03 Thread brucedickin...@wp.pl [firebird-support]
Svein,

this is amazingly smart solution. Took me like one hour to understand what is 
going on :-) I suggested window functions becausue I thought they would be most 
effective in solving this. Yes there can be holes in sequence in my data,but 
thank you for your time and proposing this solution!

[firebird-support] Re: Is it possible to do this with window function?

2015-05-03 Thread brucedickin...@wp.pl [firebird-support]
I think I've found ellegant and simple solution. However, I am afraid it might 
be very slow for large amount of data :(

Test data with holes in sequence:

INSERT INTO MYTABLE (ID, DATE_TIME, TYPE) VALUES ('1', '01.01.2015, 
00:00:00.000', 'A');
INSERT INTO MYTABLE (ID, DATE_TIME, TYPE) VALUES ('5', '01.01.2015, 
00:01:00.000', 'A');
INSERT INTO MYTABLE (ID, DATE_TIME, TYPE) VALUES ('7', '01.01.2015, 
00:02:00.000', 'A');
INSERT INTO MYTABLE (ID, DATE_TIME, TYPE) VALUES ('24', '01.01.2015, 
00:10:00.000', 'B');
INSERT INTO MYTABLE (ID, DATE_TIME, TYPE) VALUES ('36', '01.01.2015, 
00:15:00.000', 'B');
INSERT INTO MYTABLE (ID, DATE_TIME, TYPE) VALUES ('37', '01.01.2015, 
00:20:00.000', 'A');
INSERT INTO MYTABLE (ID, DATE_TIME, TYPE) VALUES ('40', '01.01.2015, 
00:25:00.000', 'A');

The query:

SELECT 
  A.TYPE, MIN(A.DATE_TIME) DATE_MIN, MAX(A.DATE_TIME) DATE_MAX,
  (SELECT FIRST 1 D.ID FROM MYTABLE D WHERE D.ID  A.ID AND D.TYPE  
A.TYPE ORDER BY D.ID ASC) FIRST_HIGHER
FROM 
  MYTABLE A
GROUP BY 
  FIRST_HIGHER, A.TYPE
ORDER BY
  DATE_MIN

And the result:

TYPE  DATE_MIN DATE_MAX
FIRST_HIGHER
A01.01.2015, 00:00:00.00001.01.2015, 00:02:00.00024
B01.01.2015, 00:10:00.00001.01.2015, 00:15:00.00037
A01.01.2015, 00:20:00.00001.01.2015, 00:25:00.000[null]

But as I've said I am afraid that the subquery will kill the performance here.

[firebird-support] Re: Is it possible to do this with window function?

2015-05-03 Thread brucedickin...@wp.pl [firebird-support]

I've posted my solution but I did not appear so I am reposting it.

I found simple solution.

The test data:

INSERT INTO MYTABLE (ID, DATE_TIME, TYPE) VALUES ('1', '01.01.2015, 
00:00:00.000', 'A');
INSERT INTO MYTABLE (ID, DATE_TIME, TYPE) VALUES ('5', '01.01.2015, 
00:01:00.000', 'A');
INSERT INTO MYTABLE (ID, DATE_TIME, TYPE) VALUES ('7', '01.01.2015, 
00:02:00.000', 'A');
INSERT INTO MYTABLE (ID, DATE_TIME, TYPE) VALUES ('24', '01.01.2015, 
00:10:00.000', 'B');
INSERT INTO MYTABLE (ID, DATE_TIME, TYPE) VALUES ('36', '01.01.2015, 
00:15:00.000', 'B');
INSERT INTO MYTABLE (ID, DATE_TIME, TYPE) VALUES ('37', '01.01.2015, 
00:20:00.000', 'A');
INSERT INTO MYTABLE (ID, DATE_TIME, TYPE) VALUES ('40', '01.01.2015, 
00:25:00.000', 'A');

The query:

SELECT 
  A.TYPE, MIN(A.DATE_TIME) DATE_MIN, MAX(A.DATE_TIME) DATE_MAX,
  (SELECT FIRST 1 D.ID FROM MYTABLE D WHERE D.ID  A.ID AND D.TYPE  
A.TYPE ORDER BY D.ID ASC) FIRST_HIGHER
FROM 
  MYTABLE A
GROUP BY 
  FIRST_HIGHER, A.TYPE
ORDER BY
  DATE_MIN

Results:

A01.01.2015, 00:00:00.00001.01.2015, 00:02:00.00024
B01.01.2015, 00:10:00.00001.01.2015, 00:15:00.00037
A01.01.2015, 00:20:00.00001.01.2015, 00:25:00.000[null]

The great thig in this solution is that I could perform SUM, AVG functions on 
the parft of the results. For example if I would like to add column SPEED in 
the future, I could calculate avarage speed during one A cluster. However, I 
am afraid that perfromance will be very poor due to subquery and sorting in 
it...

[firebird-support] Re: Is it possible to do this with window function?

2015-05-03 Thread brucedickin...@wp.pl [firebird-support]
By what logic do you arrive at this result?
 
I don't know if I can explain it any better. I want to find clusters of A, 
B, C and so on, group them into one row, get the starting date from first 
found row and ending date from the last found row in cluster.




[firebird-support] Re: Is it possible to do this with window function?

2015-05-03 Thread brucedickin...@wp.pl [firebird-support]
Svein, if you could be so kind and show me solution which includes holes in 
sequence that would be great. Once again, thank you :)
 




[firebird-support] Is it possible to do this with window function?

2015-05-02 Thread brucedickin...@wp.pl [firebird-support]
Hi guys.

I am having such data:

ID   DATE_TIMETYPE  
101.01.2015, 00:00:00.000A
201.01.2015, 00:01:00.000A
301.01.2015, 00:02:00.000A
401.01.2015, 00:10:00.000B
501.01.2015, 00:15:00.000B
601.01.2015, 00:20:00.000A
701.01.2015, 00:25:00.000A

 Is it possible to write query which will result:
 
TYPE  DATE_MIN   DATE_MAX  
A01.01.2015, 00:00:00.000  01.01.2015, 00:02:00.000
 B01.01.2015, 00:10:00.000  01.01.2015, 00:15:00.000 

 A01.01.2015, 00:20:00.000  01.01.2015, 00:25:00.000

As you can see I would like to have three groups and not two like it would have 
been with usage of standard GROUP BY. I know I can write a selectable stored 
procedure which will result me such data but is it possible to do with new 
window functions and partitioning?

Thanks.

[firebird-support] Re: How to trigger Connection shutdown error.

2015-04-26 Thread brucedickin...@wp.pl [firebird-support]
Here I've found the same question but still without answer: IBPP, a C++ API for 
Firebird Server / Mailing Lists 
http://sourceforge.net/p/ibpp/mailman/message/29303088/ 
 
 http://sourceforge.net/p/ibpp/mailman/message/29303088/ 
 
 IBPP, a C++ API for Firebird Server / Mailing Lists 
http://sourceforge.net/p/ibpp/mailman/message/29303088/ Hi Oliver, Thanks for 
the reply. The firebird log shows no indication of a server shutdown until 
immediately after the sql error has occurred. 
 
 
 
 View on sourceforge.net 
http://sourceforge.net/p/ibpp/mailman/message/29303088/ 
 Preview by Yahoo 
 
 
  


[firebird-support] How to trigger Connection shutdown error.

2015-04-24 Thread brucedickin...@wp.pl [firebird-support]
Hello,

My application is handling different kinds of connection errors:

335544721 network_error Unable to complete network request to host @1.
335544722 net_connect_err Failed to establish a connection. 
335544726 net_read_err Error reading data from the connection.
335544727 net_write_err Error writing data to the connection.

Today I've found another error:

335544856 att_shutdown Connection shutdown

In order to handle it properly I need to know how to cause it so I could test 
behaviour of my application.
Could you tell me what this error means exactly, and how to cause it?
My test environment is Windows 7 with Firebird 2.5.2 and my client application 
is on the same machine.

Thank you.
 



[firebird-support] Simultaneous inserts to the same table.

2015-01-21 Thread brucedickin...@wp.pl [firebird-support]
Hello guys,

Few months ago I've asked you (here: 
https://groups.yahoo.com/neo/groups/firebird-support/conversations/topics/125426
 ) about your experiences regarding multithreaded operations on the database.

Since then, I've implemented my solution, but after testing I see that the 
performance for multiple threads is actually MUCH worse compared to one thread. 
I've ruled out the hardware. 
No matter how much threads I use (one, two, eight...) each thread is using only 
constant amount of hard disk (for example 500kb/s).

Let me describe in pseudocode how each thread works:

while ThereIsDataToInsert do
begin
  Take100DataPackets;
  Transaction.Start;
  for each DataPacket in 100DataPackets do
InsertDataPacketToTable;
  Transaction.Commit;
end

So bascially, I am inserting 100 rows per one transaction to the same table 
from multiple threads. 

Let me show you my test results for total of 10 records inserted to a 
table. In case of multiple threads, record amount is divided proportionally to 
the thread count. 
For example, if 4 threads are inserting, each thread is inserting only 25000 
records. Data to insert is generated on the fly and has no impact on the 
performance. There is no
synchronization between threads, each thread has its own connection and 
transaction.

I am inserting data to such empty table:

  CREATE TABLE MASTER_DATA
  (
ID INTEGER NOT NULL,
ID_OBJECT INTEGER NOT NULL,
ID_DEVICE INTEGER NOT NULL,
KIND INTEGER NOT NULL,
MEASUREMENT_DATE TIMESTAMP NOT NULL,
ID_SOURCE BIGINT NOT NULL
  );

There are no triggers, no indices, no keys.


Firebird 2.5.3 Classic, local connection. Firebird on the same machine as a 
testing application.

| Threads |  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |
|   HDD   |  12 |  28 |  37 |  39 |  42 |  44 |  41 |  46 |
|   SDD   |   7 |   9 |  10 |  10 |  11 |  12 |  12 |  12 |
| RAID 10 |  36 | 118 | 222 | 258 | 280 | 273 | 288 | 291 |  

I've compared three different disk configurations. HDD and SDD were on my dev 
machine (Intel i5, nothing fancy). RAID 10 (SDD) was used on some writualized 
server with a lot of cores.
Measurements are givien in seconds. For example: It took 12 seconds for 1 
thread working on HDD to insert 10 records. Other example: It took 10 
seconds for 4 threads orking on SDD to insert 10 records (25000 per each 
thread).

As you can see, performance degrades when using more than one thread. I am 
guessing this is because of transactions? Perhaps when inserting a new record 
Firebird must perform some checks? 
Could somebody explain to me what is going on the low level of Firebird 
internals? Perhaps there is a chance to avoid those locks performed 
internally by Firebird? 

If somone knows what is going on here, please let me know. I am pretty sure we 
all could benefit from this knowledge. I think that most of us do not know how 
to optimize Firebird (wide topic I know).
Just check out Paul Reeves presentation from last conference - a lot of tests 
had been made but there are very little conclusions.

I am determined to make further tests, I want to fully utilize the speed of my 
disks.

Best regards.
 



[firebird-support] Re: Optimising High Latency Database Connections

2015-01-21 Thread brucedickin...@wp.pl [firebird-support]
Hi Gareth,

check this out: Devrace FIBPlus: Optimization of network traffic in Delphi and 
C++ Builder applications http://www.devrace.com/en/fibplus/articles/4287.php 
 
 http://www.devrace.com/en/fibplus/articles/4287.php 
 
 Devrace FIBPlus: Optimization of network traff... 
http://www.devrace.com/en/fibplus/articles/4287.php Devrace FIBPlus: 
Optimization of network traffic in Delphi and C++ Builder applications 
 
 
 
 View on www.devrace.com http://www.devrace.com/en/fibplus/articles/4287.php 
 Preview by Yahoo 
 
 
  
I know that you are using different components but maybe it will help you 
anyway (some geberal rules that might apply to you case).

[firebird-support] Re: Simultaneous inserts to the same table.

2015-01-21 Thread brucedickin...@wp.pl [firebird-support]
---In firebird-support@yahoogroups.com, fabiano@... wrote :
 
 IMHO what is going on is that Firebird is using the lock file (for Classic 
 installation) to synchronize between various connections (threads in this 
 case) to allow one by one to write to FDB file. 

I hope that Vlad or Dmitry will tell us how this works for real, so we wouldn't 
have to guess anymore:)

 I also tested this and if you run various threads inserting among different 
 tables there are no performance issues. 

I've tested it briefly and by using two threads and two different tables I can 
double the performance. However more threads/tables do not seem to speed up 
things.

The fastest way I found to insert multiple rows in a Firebird database is run 
a Stored Procedure that contains various inserts in form of a long string. 
The SP's splits this string in various inserts. 

This looks like a variant of method in which all inserts all generated as a big 
textfile on the client side and then executed on the server like one script. 
Have you compared your method to this? Because I think your SP_INSERTS might 
introduce additional overhead (you need build this script on server side). 

I think both variants might speed things up because you send only one request 
via Firebird API and network. I will definitely test this out.


With this approach I can insert around 11,000 recods/second! (if there are 
no Indexes, even PK).

11000 records / seconds does not say much, we do not know what system do you 
have and so on. If you would put this in comparision to the standard method of 
inserting then we would know how much faster it is.
For example, as you see from my test, I am using a standard method and on SSD 
it is faster than your method: 10 / 7 seconds gives 14000 records / second.


 I hope I can help you, and sorry about some English mistakes. 


No need to appologize, I've made many mistakes in my previous post (and in this 
probably too :) ). Thank you for your help Fabiano!

Best regards.





[firebird-support] Re: Simultaneous inserts to the same table.

2015-01-21 Thread brucedickin...@wp.pl [firebird-support]

 
 Yes. Text file is faster however there is a overhead of creating a new file 
 before Firebird can you it, so my approach is faster, overall. When I 
 finish building first scrip I call a thread that send this to Firebird 
 server. While the thread is sengind (waiting) I'm free to collect and 
 create a new 'line'. When this second line is done I send again to the 
 Thread. If thread is busy due waiting from Firebird server I wait until it 
 is free and then send to it. 
 So I can process a new line until I'm sending data do Firebird server. 2 
 Threads, one for creating data and one for sending data.
 This approach is faster than Text file because I don't need to wait while 
 entire text file is done and there is no overhead. 
 Got it?

Got it! Thanks:)




Re: [firebird-support] Deadlock exception occurs but it shouldn't?

2014-12-27 Thread brucedickin...@wp.pl [firebird-support]
Vlad,

that helped me a lot, thank you. It is good to know what is going under the 
hood of Firebird.
Now everything is much clearer for me and I know how to proceed with my problem.

Best regards.

[firebird-support] Re: Deadlock exception occurs but it shouldn't?

2014-12-26 Thread brucedickin...@wp.pl [firebird-support]
No need to apologize Walter. Thanks for trying to help me out! :)
 

Regards.



[firebird-support] Re: Deadlock exception occurs but it shouldn't?

2014-12-25 Thread brucedickin...@wp.pl [firebird-support]
Walter,

thank you very much for trying to explain that to me. Unfortunately I've got 
lost somewhere in the middle of your response...
 
 - If you are updating or deleting just one row, then no conflict can happen 
 with your settings. But if you want to update or delete several rows then 
 conflicts can happens.

In my test case I have two threads (or applications, I do not think that does 
have matter) which are constantly updating the same row.

 - Transaction T1 starts, transaction T2 starts, transaction T1 wants to 
 update some rows, transaction T2 wants to update some different rows. No 
 problems until now. 

This is not my case because my transactions are working on the same row but so 
far I understand that, and I agree with you. Different rows, no deadlock should 
happen.

Transaction T2 wants to update (and therefore blocks) a row and after that 
transaction T1 wants to update that row. Deadlock because transaction T1 is 
older than transaction T2.

I do not understand, why deadlock? Why T1 does not wait for T2 to 
commit/rollback?

 

 If transaction T1 blocks a row and after that transaction T2 wants to update 
 that row then transaction T2 will wait. But if transaction T2 blocks a row 
 and after that transaction T1 wants to update that row will have a 
 deadlock.

I do not understand this, why there will be a deadlock? Because the older 
transaction could not be first to block the row?

I thought I've had all figured out:(

  


 





Re: [firebird-support] Re: Deadlock exception occurs but it shouldn't?

2014-12-25 Thread brucedickin...@wp.pl [firebird-support]
Thanks Set,

unfortunately my case is exactly like I've described it above. 

I like your idea, thanks for sharing it, will have it at the back of my head as 
solution for other problems.

Re: [firebird-support] Re: Deadlock exception occurs but it shouldn't?

2014-12-25 Thread brucedickin...@wp.pl [firebird-support]
Walter,

I've tested what you've said. But it does not matter which transactions blocks 
record first (older or younger). When I do it slowly..it works ok. But if I 
start to spam those inserts with many inserts per second then I got deadlock.

[firebird-support] Deadlock exception occurs but it shouldn't?

2014-12-24 Thread brucedickin...@wp.pl [firebird-support]
Hi,

I have a very simple table:

CREATE TABLE PARAMS
(
  ID INTEGER NOT NULL,
  NAME VARCHAR(32) NOT NULL,
  CONSTRAINT PK_PARAMS PRIMARY KEY (ID),
  CONSTRAINT UNQ_PARAMS UNIQUE (NAME)
);


I have two threads which constantly and at the same time are writing to this 
table:

UPDATE OR INSERT INTO PARAMS (NAME) VALUES(:P_NAME) MATCHING (NAME) RETURNING 
ID;


I've set my transaction parameters like this:

FtraMain.TRParams.Add('isc_tpb_write');
FtraMain.TRParams.Add('isc_tpb_read_committed');
FtraMain.TRParams.Add('isc_tpb_wait');
FtraMain.TRParams.Add('isc_tpb_no_rec_version');

As far as I understand, such configuration should prevent deadlock exception to 
occur. However, deadlock still occurs from time to time:

Deadlock.
Deadlock.
Update conflicts with concurrent update.
Concurrent transaction number is 57258.


What am I doing wrong?

Thans for your assistance :)

 



[firebird-support] Re: Deadlock exception occurs but it shouldn't?

2014-12-24 Thread brucedickin...@wp.pl [firebird-support]
Just one more thing: that works as expected (no deadlock exception) when I am 
not spamming updates to table. For example:

Transaction 1: Update, no commit.
Transaction 2: Update, (transaction starts waiting).
Transaction 1: Commit;
Transaction 2: (Stops waiting) Commit;

I do not understand when lock happens when I put a much stress to the table.

[firebird-support] Re: Deadlock exception occurs but it shouldn't?

2014-12-24 Thread brucedickin...@wp.pl [firebird-support]
I see, thanks for clarification.

[firebird-support] Re: Deadlock exception occurs but it shouldn't?

2014-12-24 Thread brucedickin...@wp.pl [firebird-support]
Thank you Hugo, I was bit reluctant to use WITH LOCK since documentation 
discourages its usage.
I've tried it but it did not help.

Documentation says:

The main purposes of explicit locks are (1) to prevent expensive handling of 
update conflict errors in heavily loaded application

this is the exact reason I try to avoid conflicts. My threads can wait but they 
should not raise exceptions.

I always though that it is possible to avoid such conflicts on the database 
level.

[firebird-support] How do you name your foreign key column?

2014-12-18 Thread brucedickin...@wp.pl [firebird-support]
Hi guys,

in our database I see two naming conventions for foreign key columns:

1.
SOMETHING_ID

2.
ID_SOMETHING
 

 which one do you use and why?

 

 I see that in system tables the first convention is used (f.e. 
MON$TRANSACTION_ID, MON$ATTACHMENT_ID)
 

 Thanks for your opinion.

 

 

  


[firebird-support] Re: How do you name your foreign key column?

2014-12-18 Thread brucedickin...@wp.pl [firebird-support]
Thanks,

had no idea about USING clause :)

[firebird-support] Re: Simultaneous inserts / selects

2014-10-09 Thread brucedickin...@wp.pl [firebird-support]
@Dixon It is never to late to join conversation;) Thanks for your suggestions, 
I've found some interesting methods in my client's library.

@Doychin: I am using Delphi and FIBPlus. I am not sure if we mean the same 
thing by batch script. Some guys at my company prefer to generate a long 
script file: for example instead of making 1 inserts one by one they 
generate a text which consists all inserts. All values for inserts are 
converted to string so there are no parameters. It might be faster to send one 
big script to the server instead of 1 insert commands even if they are 
prepared. But I am not sure about that, this is something that needs to be 
checked.

I am always sending a prepared statement:)

Regards,

Martin

[firebird-support] Simultaneous inserts / selects

2014-10-03 Thread brucedickin...@wp.pl [firebird-support]
Hi,

do you have any experience in selecting from / inserting to table from multiple 
threads? Is it faster in comparision to one thread which selects / inserts data 
in queue?

What is your opinion on this? My gut tells me that it will be always slower in 
comparision to single thread. But maybe I am wrong and it is worth the hassle 
to use separate threads?

Assumption here is that each thread pulls of data with different primary / 
secondary keys and also inserts with different keys.

I would like to hear your opinion about this topic.

Thanks you.

[firebird-support] Re: What is the difference between these connection strings?

2014-10-02 Thread brucedickin...@wp.pl [firebird-support]
Thanks Helen for the nice explanation.

Out of curiosity I need to check what do you write about connections and these 
protocols in your books. :)

The thing is that I am not able to find any information about XNET in the 
Internet. I've looked thorougly. Could you point me to any reliable source that 
describes this protocol?

[firebird-support] Re: What is the difference between these connection strings?

2014-10-02 Thread brucedickin...@wp.pl [firebird-support]
Thanks again Helen:) Now I feel kinda embarassed because I should check it 
before creating this topic, but for the other hand..I wouldn't get Dmitry's 
attention;) so..I will use the occasion and ask:

Dmitry, few years ago there was a rumour that connecting through TCP/IP was 
slower than through XNET / pipes. Could you clarify on this? Is there any 
difference in terms of performance when retrieving/inserting data from/to 
database depending on the protocol?

[firebird-support] Re: What is the difference between these connection strings?

2014-10-02 Thread brucedickin...@wp.pl [firebird-support]
Thank you.

[firebird-support] What is the difference between these connection strings?

2014-10-01 Thread brucedickin...@wp.pl [firebird-support]
Hi guys,

(I've already asked for this but my topic hasn't occured since two hours on the 
group so I am trying again.)

I know that I can connect to Firebird (on Windows) by specifying connection 
string in two ways:

1. C:\MyDB.FDB
2. localhost:C:\MyFDB.FDB

I am speaking here about local connection.

Is there any difference between these two connection strings? I know that when 
I use localhost then TCP\IP protocol is used. What protocol is used in the 
first case?

Is it possible that connection to database will become unavailable on some 
machines when I switch from first connection string to the second one?

Thanks for your time.

 



[firebird-support] Re: What is the difference between these connection strings?

2014-10-01 Thread brucedickin...@wp.pl [firebird-support]
Thank you, 

so I know that the second connection might be blocked by the Firewall but what 
are the internal differences between these two type of connections?

Regards.

[firebird-support] Re: A lot of fb_inset_server.exe processes are hanging.

2014-08-11 Thread brucedickin...@wp.pl [firebird-support]
 What OS is the client/customer system? 
 
It is Windows server 64 bit, Firebird is 32 bit.




Re: [firebird-support] A lot of fb_inset_server.exe processes are hanging.

2014-08-08 Thread brucedickin...@wp.pl [firebird-support]
Thank you Carlos,

I will try to setup those TCP/IP options but something tells me that those 
fb_inet_server processes were hanging on client machine way longer than 2 
hours...

[firebird-support] A lot of fb_inset_server.exe processes are hanging.

2014-08-07 Thread brucedickin...@wp.pl [firebird-support]
Hi guys,

We have few applications that are..lets say far from beeing stable;) Those 
applications spawn multiple threads and each of them have its own connection to 
database. So... there is a lot of fb_inet_server.exe processes and that is 
fine. However, as I said, our applications are unstable so from time to time we 
need to kill them. The problem is that when we kill them, fb_inet_server.exe 
processes are not killed automatically. I mean, sometimes they are and 
sometimes they are not.

I would like to know have you observed simmilar behaviour? I am not able to 
reporduce it on my own machine but it happens very often on the customer's 
server. If I kill in the task manager my application, all fb_inet_server execs 
dissapear almost instantly but on customer's machine very often they will stay 
forever.

How the main fb_inet_server process know when to kill the lesser ones;) ?
 



[firebird-support] Re: Very long transaction start after deleting a big number of records.

2014-07-28 Thread brucedickin...@wp.pl [firebird-support]
Thanks guys.

I haven't thought about scanning all the rows with SELECT after DELETE but it 
might be something. Perhaps FB 3.0 will help us with this.

[firebird-support] Re: Anyone know what has happened to FIBPlus

2014-07-24 Thread brucedickin...@wp.pl [firebird-support]
Hello, it seems to me that project closed.
One of the part of Delphi XE5(there is version for XE4 too, but like 
additional pack components) and higher is FireDac(ex AnyDAC) it's more 
powerful set of components for database access than FibPlus.

Well, not in the case of Firebird. I've made a tests (compared 3 different 
component sets) and FIBPlus was the fastest in case of selecting a large 
dataset. 

The one and only one problem with FIBPlus is that there is no support:)

[firebird-support] Very long transaction start after deleting a big number of records.

2014-07-24 Thread brucedickin...@wp.pl [firebird-support]
Hi,

1. I've deleted 50 records from TABLE A. I've commited transaction.
2. I made SELECT * FROM TABLE A. Transaction was starting for a very long time.

I just wanted to make sure that there is no way to prevent this behaviour? I 
mean, I can not delay somehow  clearing of this garbage?

As far as I understand this article: 
http://www.firebirdsql.org/manual/gfix-housekeeping.html 
http://www.firebirdsql.org/manual/gfix-housekeeping.html   

 there is no such possibility becasue:
 

 Whenever a subsequent transaction reaches garbage from a committed 
transaction, that garbage is automatically cleared out.