Re: [firebird-support] Consecutive values from different fields

2019-01-28 Thread Svein Erling Tysvær setys...@gmail.com [firebird-support]
Sure, just use:

execute block returns ( consecutivedays integer ) as ...
 where drivernr = 697

Den man. 28. jan. 2019 kl. 08:54 skrev 'Autoneer' myauton...@gmail.com
[firebird-support] :

>
>
> Thank you Lester, Omacht and Set
>
>
>
> Sorry a simple oversight on my side it now works 100%.
>
>
>
> Can this be run without having the end user input the variable i.e.
> :drivernr?
>
>
>
> I want to programmatically provide the driver nr as I only need the result
> to populate a field in another table ?
>
>
>
> Regards
>
>
>
> Stef
>
>
>
> *From:* firebird-support@yahoogroups.com [mailto:
> firebird-support@yahoogroups.com]
> *Sent:* 27 January 2019 11:50
> *To:* firebird-support@yahoogroups.com
> *Subject:* Re: [firebird-support] Consecutive values from different fields
>
>
>
>
>
> On 27/01/2019 08:03, 'Autoneer' myauton...@gmail.com [firebird-support]
> wrote:
> > Thank you much appreciated, I would agree with Lester’s approach however
> > this an inherited DB.
>
> You need a ';' after the wd2 ... I think
>
> Before we have CTE functions it was common to create temporary tables to
> reformat the data and create triggers to copy data from the 'legacy'
> tables to ones that make reporting easier. I'm still using some of the
> same legacy stuff 20 years on ;) Creating the SQL for a CTE query is
> often easier if one 'designs' the table one actually needs and then work
> out how to build it much like the execute block is doing ...
>
> --
> Lester Caine - G8HFL
> -
> Contact - https://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - https://lsces.co.uk
> EnquirySolve - https://enquirysolve.com/
> Model Engineers Digital Workshop - https://medw.co.uk
> Rainbow Digital Media - https://rainbowdigitalmedia.co.uk
>
>
>
> 
>


Re: [firebird-support] Consecutive values from different fields

2019-01-28 Thread myauton...@gmail.com [firebird-support]
Thank you already did that much appreciated

RE: [firebird-support] Question about delay in fetch operation

2019-01-28 Thread Rudi Feijó rudi.fe...@multidadosti.com.br [firebird-support]
>Look at gstat output

>You probably have very long version this particular record

 

Hi Karol.
I checked gstat and made a manual sweep of the database, but the problem 
persists. 
There are some things I’m finding odd :

-The query brings 4791 records total 

-Always on record 4000, it hangs and delays for 15 seconds

-If I manually remove record number 4000, the same thing happens (the “next” 
record 4000 also hangs the query)

-If I limit the query to just one record short of the total, “SELECT FIRST 
4790”, the slow down DOES NOT happen, query runs fine

-I tried, then, removing the last record from the table, so that my new total 
is 4790, but that didn’t work, the unpaginated query still hangs at record 4000



Re: [firebird-support] Question about delay in fetch operation

2019-01-28 Thread John vdW j...@jvdw.nl [firebird-support]
Op 28-01-2019 om 14:14 schreef Rudi Feijó rudi.fe...@multidadosti.com.br 
[firebird-support]:



>Look at gstat output

>You probably have very long version this particular record

Hi Karol.
I checked gstat and made a manual sweep of the database, but the 
problem persists.

There are some things I’m finding odd :

-The query brings 4791 records total

-Always on record 4000, it hangs and delays for 15 seconds

-If I manually remove record number 4000, the same thing happens (the 
“next” record 4000 also hangs the query)


-If I limit the query to just one record short of the total, “SELECT 
FIRST 4790”, the slow down DOES NOT happen, query runs fine


-I tried, then, removing the last record from the table, so that my 
new total is 4790, but that didn’t work, the unpaginated query still 
hangs at record 4000



Hi Rudi,

Have you tried the same query with isql ?

(Just to rule out a possible problem at clientside)

John



RE: [firebird-support] Question about delay in fetch operation

2019-01-28 Thread Rudi Feijó rudi.fe...@multidadosti.com.br [firebird-support]
>>Look at gstat output

>>You probably have very long version this particular record

 

>Hi Karol.
>I checked gstat and made a manual sweep of the database, but the problem 
>persists. 
>There are some things I’m finding odd :

>-The query brings 4791 records total 

>-Always on record 4000, it hangs and delays for 15 seconds

>-If I manually remove record number 4000, the same thing happens (the “next” 
>record 4000 also hangs the query)

>-If I limit the query to just one record short of the total, “SELECT FIRST 
>4790”, the slow down DOES NOT happen, query runs fine

>-I tried, then, removing the last record from the table, so that my new total 
>is 4790, but that didn’t work, the unpaginated query still hangs at record 4000

>Hi Rudi,

>Have you tried the same query with isql ?

> (Just to rule out a possible problem at clientside)

>John

_

John, yes I tried with isql, same behaviour.

Im using firebird 3, tried with the latest stable release, and the latest 
snapshot from today.



Re: [firebird-support] Question about delay in fetch operation

2019-01-28 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
28.01.2019 17:07, Rudi Feijó rudi.fe...@multidadosti.com.br [firebird-support] 
wrote:
> Im using firebird 3, tried with the latest stable release, and the latest 
> snapshot from today.

   Did you try it in embedded mode?


-- 
   WBR, SD.


RE: [firebird-support] Question about delay in fetch operation

2019-01-28 Thread Rudi Feijó rudi.fe...@multidadosti.com.br [firebird-support]
> Did you try it in embedded mode?

Tried downloading it now but couldnt find the embedded version for firebird 3



[firebird-support] Connection lost after long inactive time

2019-01-28 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
Hello all,

I have a customer who is reporting this scenario:

He has several type C networks (192.168.x.y) routed together. When a
client is inactive for some time (e.g. a few hours) the connection
gets lost, BUT ONLY when the connection is from another network than
the one the server resides in. Connections from the same network stay
open.

The error that the client gives is "Unable to complete network request
to host "XYZ". Error writing data to the connection."
I assume this is because the TCP connection to the server was somehow
half-closed.

Does anybody have an idea what is going on here?

Firebird 2.5.5  64-bit on Windows 2012 R2
DummyPacketInterval = 0 (but this should be irrelevant for this type
of issue)

The admin says there is nothing the routers that would cancel TCP
connections after a while. (I can't check that because I don't know
how to configure routers and I don't know how skilled this person is.)


Regards

Stefan

-- 
Stefan Heymann, Tübingen, Germany







++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Question about delay in fetch operation

2019-01-28 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
28.01.2019 18:10, Rudi Feijó rudi.fe...@multidadosti.com.br [firebird-support] 
wrote:
> Tried downloading it now but couldnt find the embedded version for firebird 3

   Read Release Notes. Embedded mode is used automatically for local 
connections.


-- 
   WBR, SD.


Re: [firebird-support] Connection lost after long inactive time

2019-01-28 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
28.01.2019 18:15, Stefan Heymann li...@stefanheymann.de [firebird-support] 
wrote:
> Does anybody have an idea what is going on here?

   Yes. Router (CISCO most likely) or firewall (Comodo) breaks inactive TCP 
connection.

> DummyPacketInterval = 0 (but this should be irrelevant for this type
> of issue)

   Try to change it. This _is_ relevant for this type of issue.

> The admin says there is nothing the routers that would cancel TCP
> connections after a while.

   Ask him to check again whole trace between server an client where this issue 
appears.


-- 
   WBR, SD.






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



RE: [firebird-support] Question about delay in fetch operation

2019-01-28 Thread Rudi Feijó rudi.fe...@multidadosti.com.br [firebird-support]

>Read Release Notes. Embedded mode is used automatically for local connections.

Sorry. In that case, yes, I tried with embedded too.



RE: [firebird-support] Firebird database executing DML queries very slowly.

2019-01-28 Thread 'Joje' j...@codework-solutions.com [firebird-support]
Ran the command and got the header information from the client. Below is 
database header page information of the affected database :  



Flags  0  

Checksum   12345  

Generation 9101445  

Page size 4096  

ODS version   11.2  

Oldest transaction   8991282  

Oldest active  9100701  

Oldest snapshot   9100701  

Next transaction  9100702  

Bumped transaction   1  

Sequence number  0  

Next attachment ID24698  

Implementation ID  26  

Shadow count   0  

Page buffers  0  

Next header page   0  

Database dialect   3  

Attributes   force write  

Variable header data:  

Sweep interval:2  

*END*  

 

The difference between the oldest transaction and newest transaction is large.  

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-supp...@yahoogroups..com] 
Sent: Friday, January 25, 2019 20:32
To: firebird-support@yahoogroups.com
Subject: ODP: [firebird-support] Firebird database executing DML queries very 
slowly.

 

  

Hi.

 

When you gain slowdows 

Run

gstat -h

 

and put here results.

Problem probably is because of some long running transaction.

 

Regards,

Karol Bieniaszewski