Re: [firebird-support] Help needed with grouping, GROUP BY and LIST()

2016-08-26 Thread Mike Ro miker...@gmail.com [firebird-support]
Hi Sean, Look at using Common Table Expressions (CTE) Here is a rough sample based on your details Thank you for the pointer to CTE and the example. I have only looked at CTE briefly once before (for representing tree structures), so it will take me some time to do some reading and to

RE: [firebird-support] Help needed with grouping, GROUP BY and LIST()

2016-08-26 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
> > Q: Did you mean to exclude the 2nd "HIGH_FLOW" characteristic value from > > the summary? > > Yes, the same information should not be repeated within a single 'field'. The > second "HIGH_FLOW" characteristic is only in the original result set because > it > has 2 properties (> 10 litres /

RE: [firebird-support] Help needed with grouping, GROUP BY and LIST()

2016-08-26 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
Mike, > Q2. How can I create a further table J_RESULT_GROUP and query for > arbitrarily grouping results together where any distinct elements are LIST()ed > whilst common elements are 'GROUP'ed (i.e. appear only once). For > example if J_RESULT_GROUP had 2 rows: > GROUP TEST > 1    2 > 1    44 >

Re: [firebird-support] Help needed with grouping, GROUP BY and LIST()

2016-08-26 Thread Mike Ro miker...@gmail.com [firebird-support]
Hi Sean, thank you for your answer. Some questions before I can give a suggestion: > TEST_IDJFI_IDF_NAMEN1_NAMEN2_NAME MODECHARACTERIST > ICPROPERTY > 11FLOW_1NODE_ANODE_BMODE_1 HIGH FLOW> 10 litres / > sec > 11FLOW_1NODE_A

RE: [firebird-support] Help needed with grouping, GROUP BY and LIST()

2016-08-26 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
Mike, Some questions before I can give a suggestion: > TEST_ID    JFI_ID    F_NAME    N1_NAME    N2_NAME    MODE    CHARACTERIST > IC    PROPERTY > 1    1    FLOW_1    NODE_A    NODE_B    MODE_1    HIGH FLOW    > 10 litres  / > sec > 1    1    FLOW_1    NODE_A    NODE_B    MODE_1    HIGH FLOW   

[firebird-support] Help needed with grouping, GROUP BY and LIST()

2016-08-26 Thread Mike Ro miker...@gmail.com [firebird-support]
I am modeling some abstract flow tests. A 'flow instance' is defined as some sort of flow from Node A to Node B. This is simply modeled with 3 tables as follows (I have left out the alter table add constraints for brevity): CREATE TABLE FLOW ( ID integer NOT NULL PRIMARY KEY, NAME

[firebird-support] Getting INET/inet_error: read errno = 10054

2016-08-26 Thread Jardar Maatje jardar.maa...@nds.nortek.no [firebird-support]
Hi We are running fb 2.5.6 and are getting the INET erorr regularily. The error has been there before as well with earlier versions of fb. Is this something I should be conserned about and what can I do about it? Another issue is that when I list transactions I have a transaction that is

Re: [firebird-support] Delete causes server to hang

2016-08-26 Thread 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support]
The rows clause does work on delete (and update) statements. Mark - Bericht beantwoorden - Van: "'livius' liviusliv...@poczta.onet.pl [firebird-support]" Aan: Onderwerp: [firebird-support] Delete causes server to hang

Re: [firebird-support] Delete causes server to hang

2016-08-26 Thread 'livius' liviusliv...@poczta.onet.pl [firebird-support]
Hi, your statement is incorrect select count(* ) should by after autonomous transaction commit not inside it if it is in the same transaction then garbage collector cannot remove versions and also i do not suppose that delete from requests where created < :delete_all_before rows 1000; is

RE: [firebird-support] Delete causes server to hang

2016-08-26 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
> Anyway, right now there is not enough information - to investigate it, run > gstat -r -t < tablename > stat.txt Additionally, use gstat and extract the header page stats. This will allow for the OAT, OIT, and current transaction to be reviewed, and check the sweep interval setting. Sean

Re: [firebird-support] Character sets and collations of columns

2016-08-26 Thread Tomasz Tyrakowski t.tyrakow...@sol-system.pl [firebird-support]
On 26.08.2016 o 14:35, robert rottermann rob...@redcor.ch [firebird-support] wrote: > I have no idea at on how to fix it "correctly", but would it not be an > idea just to dump the tables with weird character into a text file, and > search replace them. > > The wrong chars are probably uniformly

Re: [firebird-support] Character sets and collations of columns

2016-08-26 Thread robert rottermann rob...@redcor.ch [firebird-support]
I have no idea at on how to fix it "correctly", but would it not be an idea just to dump the tables with weird character into a text file, and search replace them. The wrong chars are probably uniformly wrong, so you should be able to fix them using sed or some such tool (on linux, I am not

[firebird-support] Character sets and collations of columns

2016-08-26 Thread Tomasz Tyrakowski t.tyrakow...@sol-system.pl [firebird-support]
Hi, One of the legacy databases I happen to maintain has character sets and collations messed up. As far as I know, the database was created with default character set "NONE" instead of "WIN1250", which should have been set back then (and it's over 10 years old). Then, some columns have been

Re: [firebird-support] Delete causes server to hang

2016-08-26 Thread kragh.tho...@yahoo.com [firebird-support]
Hey Tim The code does not do anything active, but we run backup 4 times a day. I have tried batching the delete, so that one batch runs in a autonomous transaction, and made at count on the table after each batch, but with no luck. The idea was to reduce the number of deleted rows that the

Re: [firebird-support] Delete causes server to hang

2016-08-26 Thread kragh.tho...@yahoo.com [firebird-support]
Hey Helen Thanks for hour reply, let me see if i can clarify the problem, the actual delete of the 90.000 rows is not the problem, this completes in 10-30 seconds. That is just fine, performance does not matter here. I have 2 web servers, on each of them, there is a background thread that

Re: [firebird-support] Delete causes server to hang

2016-08-26 Thread 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support]
Which Firebird version are you using, and do you use Super, Classic or SuperClassic? Mark - Bericht beantwoorden - Van: "kragh.tho...@yahoo.com [firebird-support]" Aan: Onderwerp: [firebird-support] Delete causes