Re: [firebird-support] Firebird 3 crashes ( terminated abnormally (4294967295) )

2017-08-23 Thread Jesus Garcia jeg...@gmail.com [firebird-support]

> El 23 ago 2017, a las 19:56, Rudi Feijó rudi.fe...@multidadosti.com.br 
> [firebird-support]  escribió:

Isn't better install a debug version and capture the crash dump?
> 


Re: [firebird-support] Re: Automatic Firing of Query.

2017-08-21 Thread Jesus Garcia jeg...@gmail.com [firebird-support]

> El 21 ago 2017, a las 15:47, anshuman.na...@airtelmail.in [firebird-support] 
>  escribió:
> 
> Thanks for this.   Just a quick clarification.  Which version are/were u 
> using.   
> 
> 
> We are using 2.5.2.26539 (x64)  and the file IBDatabase.pas doesn't have the 
> code which you had mentioned or even any reference to class TSchema.
> 
This is independent of fb/ib version. The code is executed allways.

The source is from Delphi 2007. I don't know where is located this code in new 
ibx versions.

> Also, during debug, would I be able to see as to which file is being invoked 
> to execute the query?
> 

I think so. Add the ibx component path to Delphi debug path.

Jesús 
> 


Re: [firebird-support] Re: Automatic Firing of Query.

2017-08-21 Thread Jesus Garcia jeg...@gmail.com [firebird-support]
2017-08-17 16:19 GMT+02:00 anshuman.na...@airtelmail.in [firebird-support] <
firebird-support@yahoogroups.com>:

>
>
> Yes Jesús, we are using ibx.
>
> Can u please share the details with me.   Of share the modified file if
> possible.
>

I have modified IBDatabase.pas. There is some checks that calls add_node to
get information from system tables. I don't need this information in my
applications, and I don't see it necessary to justify the overhead of calls
to system tables.
These three methods calls to add_node, that create a lot of queries when
datasets are opened. These queries are executed only one time, because the
information that load is cached. After this changes you will see and speed
up when opening datasets.

function TSchema.Has_COMPUTED_BLR(Relation, Field: String): Boolean;
var
  FRelationList : TStringList;
  FField : TFieldNode;
  i : Integer;
begin
   Result := False;
*   exit; *
  i := FRelations.IndexOf(Relation);
  FField := nil;
  if i >= 0 then
  begin
FRelationList := TStringList(FRelations.Objects[i]);
i := FRelationList.IndexOf(Field);
if i >= 0 then
  FField := TFieldNode(FRelationList.Objects[i]);
  end
  else
FField := Add_Node(Relation, Field);
  if Assigned(FField) then
Result := Ffield.COMPUTED_BLR
  else
Result := false;
end;

function TSchema.Has_DEFAULT_VALUE(Relation, Field: String): Boolean;
var
  FRelationList : TStringList;
  FField : TFieldNode;
  i : Integer;
begin
  Result := False;
*  exit;*
  i := FRelations.IndexOf(Relation);
  FField := nil;
  if i >= 0 then
  begin
FRelationList := TStringList(FRelations.Objects[i]);
i := FRelationList.IndexOf(Field);
if i >= 0 then
  FField := TFieldNode(FRelationList.Objects[i]);
  end
  else
FField := Add_Node(Relation, Field);
  if Assigned(FField) then
Result := Ffield.DEFAULT_VALUE
  else
Result := false;
end;

function TSchema.In_Key(Relation, Field: String): Boolean;
var
  FRelationList : TStringList;
  FField : TFieldNode;
  i : Integer;
begin
  Result := False;
*  exit; //*
  i := FRelations.IndexOf(Relation);
  FField := nil;
  if i >= 0 then
  begin
FRelationList := TStringList(FRelations.Objects[i]);
i := FRelationList.IndexOf(Field);
if i >= 0 then
  FField := TFieldNode(FRelationList.Objects[i]);
  end
  else
FField := Add_Node(Relation, Field);
  if Assigned(FField) then
Result := Ffield.In_Key
  else
Result := false;
end;


Re: [firebird-support] Re: Automatic Firing of Query.

2017-08-17 Thread Jesus Garcia jeg...@gmail.com [firebird-support]

> El 17 ago 2017, a las 15:33, Mark Rotteveel m...@lawinegevaar.nl 
> [firebird-support]  escribió:

Are you using ibx?

I modified the source code of ibx in order to avoid this queries, that are only 
used to know if a field is computed or not, and of course I speed up the action 
of open ibdataset.

The information that was retrieved by these queries was not used in our app.

Jesús

Re: [firebird-support] nbackup : Error assessing database due a missing delta file

2017-08-04 Thread Jesus Garcia jeg...@gmail.com [firebird-support]


> El 4 ago 2017, a las 19:05, Dimitry Sibiryakov s...@ibphoenix.com 
> [firebird-support] <firebird-support@yahoogroups.com> escribió:
> 
> 04.08.2017 18:52, Jesus Garcia jeg...@gmail.com [firebird-support] wrote:
>> As I understood he was saying to not use nbackup, and if one person involved 
>> in any way to 
>> firebird says not to use it, then what make him think to others?
> 
>   There is a difference between "do not use it" and "do not use it with this 
> version".

Sorry, may be I have not understood this phrase.

"Always use the latest release. For 2.5 it is 2.5.7. But even with this it is 
not guaranteed to work. Check list of nbackup-related bugs in tracker"

Jesús 


Re: [firebird-support] nbackup : Error assessing database due a missing delta file

2017-08-04 Thread Jesus Garcia jeg...@gmail.com [firebird-support]


> El 4 ago 2017, a las 16:54, 'Leyne, Sean' s...@broadviewsoftware.com 
> [firebird-support]  escribió:
> 
> > I only see three items pending, but anyway, why not remove Nbackup from 
> > firebird until it is safe to use? 
> 
> As others have pointed out, the latest FB versions have an updated nbackup 
> 
> 
> > Why is there a tool that cannot be used in a safe way? 
> 
> Q1: How do you *know* if a tool is safe in all possible situation/conditions? 
> 
> A1: You test under all possible conditions? 
> 
> 
> Q2: Can all possible conditions be predicted/known in advance? 
> 
> A2: Absolutely not! That is why all software has bugs! 
> 

Hello Sean, I was replying to dimitry s. Have you read his response?

As I understood he was saying to not use nbackup, and if one person involved in 
any way to firebird says not to use it, then what make him think to others?

Jesus

Re: [firebird-support] nbackup : Error assessing database due a missing delta file

2017-08-03 Thread Jesus Garcia jeg...@gmail.com [firebird-support]
> 
> Always use the latest release. For 2.5 it is 2.5.7. But even with this it is 
> not 
> guaranteed to work. Check list of nbackup-related bugs in tracker: 
> http://tracker.firebirdsql.org/secure/IssueNavigator.jspa?sorter/field=updated/order=
> 

I only see three items pending, but anyway, why not remove Nbackup from 
firebird until it is safe to use?
> 

Why is there a tool that cannot be used in a safe way?

Re: [firebird-support] witch vresion of Firebird to choose for Delphi 7 and IBX 7.09

2017-06-23 Thread Jesus Garcia jeg...@gmail.com [firebird-support]


> El 23 jun 2017, a las 19:43, safirh...@yahoo.fr [firebird-support] 
>  escribió:
> 
> Hi ,
> Please i have developped an application with delphi 7 and interbase 7.5 
> server.
> I have used IBX components.
> Just i want to use Firebird instead of interbase 7.5 server.
> but I am i am afraid that   the Firebird are not compatible with IBX 
> componants,
> please witch version of firebird to use with ibx componants, because i do not 
> want to modify my programme source for this moment.
> thank you very much
> 
> 
> 
Hello, I'm using firebird 2.5.x with ibx and I have no problem. Just rename 
fbclient.dll to gds32.dll
(32bit). You may have problems trying to connect to firebird with gds32 of 
Interbase. 

Regards
Jesús


> 


Re: [firebird-support] Migration from Interbase 7.5 to Firebird 2.5.4

2016-12-01 Thread Jesus Garcia jeg...@gmail.com [firebird-support]

>> It is my First question in this group. 
>> 
>> I would like to know if someone has accomplished a migration from
>> 
>> Interbase 7.5 to Firebird 2.5.4 
I did it years ago.

1. Extract metadata from Interbase
2. Create the database in firebird with the metadata extracted. You may have to 
correct the source metadata, because the creation process will raise errors.
3. Once created firebird database, I used ibpump, free tool, to pump data from 
Interbase to firebird.
4. Test your application.

Jesús.

Re: [firebird-support] Re: Best way to delete millions of rows

2016-10-31 Thread Jesus Garcia jeg...@gmail.com [firebird-support]
> 
> Here you delete some records, but then count whole table.
> Add same "where" condition as in "count" query
> 
> Regards,
> Vlad

I think the execution of select count is for garbage collection.

If count of records that does not exists is executed, will be the garbage 
collection executed for the deleted records?

Jesus
> 


Re: [firebird-support] MAX() and index

2015-09-07 Thread Jesus Garcia jeg...@gmail.com [firebird-support]


> El 7/9/2015, a las 15:00, Tim Ward t...@telensa.com [firebird-support] 
>  escribió:
> 
> Please can someone explain to me, again, why
> 
> select Max(MYCOL) from MYTAB
> 
> doesn't use the primary key
> 
> PLAN (MYTAB NATURAL)
> 
I think you need to have a descending index in order to use it for select max.

If you select min instead of max, the pk index will be used

Jesus
> 


Re: [firebird-support] About firebird performance

2015-09-05 Thread Jesus Garcia jeg...@gmail.com [firebird-support]
Hello Hector, what version of firebird are you running, super server, super 
classic or classic server?

Jesus Angel Garcia Zarco
Cointec

> El 5/9/2015, a las 18:00, Hector Sánchez hec...@planatec.es 
> [firebird-support]  escribió:
> 
> I discovered something else quite interesting:
> 
> I realized both IB and FB dbs have pagebuffers set to 100.000. I changed FB 
> to 0 and now it works like I expected!!..Same query now completes on FB on 50 
> sec. It seems this is the problem although I don't understand why.
> 
> Nevertheless, I'll try on a physical machine as you and Carlos suggest and 
> see how it behaves.
> 
> 
> 
> 2015-09-05 15:47 GMT+02:00 Alexey Kovyazin a...@ib-aid.com [firebird-support] 
> :
>>  
>> Hi Hector,
>> 
>> Thanks for statistics, it clarifies situation.
>> 
>> There is 304880 data pages, each is 4kb, so Firebird need to read 1.1Gb of 
>> data to count records.
>> Count uses NATURAL scan, so it's a simple set of disk reads, CPU is not 
>> involved.
>> 
>> Regular SATA3 disk should read 30-70Mb per second (I assume database is not 
>> fragmented, since you told it was freshly restored), it gives us estimation 
>> from 15 to 30 seconds.
>> 
>> So, I think there is a disk IO problem.
>> Try it on another computer (better not virtual).
>> 
>> Regards,
>> Alexey
>> 
>> 
>> 
>> 
>> 
>>>  
>>> He again Alexey,
>>> 
>>> As I suspected, my problem is not caused by GC:
>>> 
>>> gstat over the table reported this:
>>> 
>>> TABLE1 (503)
>>> Primary pointer page: 9374, Index root page: 9375
>>> Average record length: 317.63, total records: 3261775
>>> Average version length: 0.00, total versions: 0, max versions: 0
>>> Data pages: 304880, data page slots: 304880, average fill: 90%
>>> 
>>> Also, as you suggested ran the query twice a got exaclty the same times: 
>>> 51minutes to complete!!!
>>> 
>>> I must have something obvious which is killing firebird performance, but 
>>> cannot guess it.
>>> 
>>> Any help would be appretiated. 
>>> 
>>> 
>>> 2015-09-05 11:59 GMT+02:00 Alexey Kovyazin a...@ib-aid.com 
>>> [firebird-support] :
  
 Hi Hector,
 
 So you finally decided to try Firebird - that's good.
 
 I think that you are facing garbage collection problem - if there are a 
 lot of   record versions in the TABLE1 which 
 are not interested to any transaction, your query will force garbage 
 collection, and it can take some time.
 
 How to check? run SELECT count(*) twice and compare execution times, and 
 other query statistics (reads/writes).
 
 Also, run gstat -a -r  and check information for TABLE1 - 
 VERSIONS and MAX VERSIONS, if there are big numbers there, problem is 
 certainly related with record versions, with the initial cause in wrong 
 transactions management - i.e.,   long-running 
 write transactions or forced rollbacks.
 
 
 Regards,
 Alexey Kovyazin
 IBSurgeon
 
 
 
 
 
 
>  
> I'm doing some basic tests with Firebird and I'm facing something I
> cannot understand (I'm a newbie to Firebird which has worked with
> IB7.5 for years, so I apologize if I ask something obvious):
> 
> - I have a linux server with firebird 2.5.4 Superserver: multi-core (4), 
> 3GB RAM
> - I placed a "huge" database: 1000 tables, 9GB
> - When I issue a query like this "select count(*) from TABLE1" it
> takes very long time to complete (>30 min).
> - TABLE 1 has 3 million records
> 
> As I told you, I'm quite used to IB7.5, but I guess this is not normal
> at all...probably I'm missing something but I couldn't find any
> document which gives me an idea of   what 
> I'm doing wrong.
> 
> With same hardware an IB7.5 same query took 40 sec to complete (first
> time issued, no cache).
> 
> Could anyone help?
> 
> -- 
> --
> Planatec Software S.L. ** 
> telf: +34 964 340 560 ** fax: +34 961 130 921
>>> 
>>> 
>>> --
>>> Planatec Software S.L. ** 
>>> telf: +34 964 340 560 ** fax: +34 961 130 921
> 
> 
> --
> Planatec Software S.L. ** 
> telf: +34 964 340 560 ** fax: +34 961 130 921
> 


Re: [firebird-support] Firebird 2.52 gbak fails to do a restore - error trigger (3)

2015-06-11 Thread Jesus Garcia jeg...@gmail.com [firebird-support]
Hello jack, may be you have a problem with the metadata of your database, that 
were compatible with interbase 6 but not with firebird. Firebird is more strict 
than Interbase was. I had problem in the past backing up interbase 5.6 and 
restoring in firebird.

The problem was solved, extracting metadata source and creating the database in 
firebird from metadata source. In that process I found some problems that let 
me correct the source database.

I think that you would try to extract metadata source, create the database in 
firebird from that source, and then pump data from source to destination 
database.

If I were you, I would have done this when moving from Interbase 6 to Firebird. 
I did it and have not had problems.

In the process of database creation in Firebird from metadata, may be you will 
find the problem in your source database.

Good luck

Jesus Angel Garcia Zarco
Cointec

 


Re: AW: AW: AW: AW: [firebird-support] Re: Memory usage excess / leak in FBServer 2.5.4

2015-06-09 Thread Jesus Garcia jeg...@gmail.com [firebird-support]


   Thank you !

 Vlad


 Vlad, does this issue affect classic and superclassic?


Re: [firebird-support] losing connection with server on a local PC

2015-05-12 Thread Jesus Garcia jeg...@gmail.com [firebird-support]


 El 12/5/2015, a las 20:56, shg_siste...@yahoo.com.ar [firebird-support] 
 firebird-support@yahoogroups.com escribió:
 
 Hello! I have a Delphi app with Firebird. Everything in a single PC which is 
 accesed via Remote Desktop by 5 or 6 users.
 
 
 
 It worked fine for much years. But since yesterday, My app reports an error 
 of conection lost. I'm used to see this error when working on a local 
 network and some PC lost the conection with the sersver. But never saw it on 
 a local PC.
 
 
 
 The Windows log reports this (i'm attaching the text bellow)
 
 
 
 Do you think that I should just reinstall FB as Windows suggest? Or the 
 problem may be another? 
 
Have you reviewed firebird.log?
Jesus

Re: [firebird-support] large system slows over time

2015-05-05 Thread Jesus Garcia jeg...@gmail.com [firebird-support]

 El 5/5/2015, a las 12:15, Nick Upson n...@telensa.com [firebird-support] 
 firebird-support@yahoogroups.com escribió:
 
 Hi
 
 I have a system that is slowing down the longer it stays running and I'd like 
 to know why.
 
 The system is running firebird 2.1.5 on centos 5 with an average of 27 
 transactions per second and has now been running for 112 days. The data 
 throughput is unchanged, data is removed from the db as fast as its added so 
 the database remains roughly the same size at 130Gb.
 
 for example: on 1st Feb the backup took 4hr 35 min, last night took 9hrs 30 
 min
 
 Is this a known 2.1 issue (move to 2.5 is in the planning stages)?
 
 Is there anything I can do to prevent or improve this situation?
 
 Is there any evidence I can gather before I reboot the system which I expect 
 (from past experience) will return the system to the better performance
 
Hello, I think the problem is the database fragmentation along the time. I have 
databases in production 24x7x365.

Every night I do a sweep and after a backup. The database backup takes more and 
more time to complete, month by month, and the increase of time is not 
proportional to increase of db size.

Two years ago one of our customer database was 30 Gb and took 1 hour to backup. 
Today the size is near 50 Gb and takes near 4 hour to backup. In other 
customers, where the size don't increase in that amount, the backup time 
increases month by month, more than database increased size.

If I backup and restore on a test environment, the time is good. I think that a 
fresh restore has all table pages not fragmented. gbak backup table by table 
and having contiguous pages is better for backup performance. When users works 
on database, pages are not contiguous and to backup a table the hdd heads have 
to move to more places.

Well, this is what I think about the increasing of backup time. I can't restart 
the server to test if that decrease backup time.

I use windows 2008 

 


Re: [firebird-support] Internal Transaction in Fb 2.5.4 Trace Log

2015-04-15 Thread Jesus Garcia jeg...@gmail.com [firebird-support]
If you execute transaction.commitretaining the transaction counter increases 
but no new transaction is created, then you don't see that number in the log.

Jesus Angel Garcia Zarco
Cointec

 El 15/4/2015, a las 9:50, hannu.laurikai...@yahoo.com [firebird-support] 
 firebird-support@yahoogroups.com escribió:
 
 I executed my application which uses a Fb database. Trace log was enabled. 
 There was a strange internal transaction
 
 
 
 2015-04-14T10:46:44.6010 (3684:00D0A9F4) START_TRANSACTION
 
 
 
   C:\. . .\MYDATABASE.FDB (ATT_0, unknown_user, NONE, internal)
 
 
 
 
   (TRA_595, READ_COMMITTED | REC_VERSION | WAIT | READ_ONLY)
 
 
 It stayed active over 6 minutes until I stopped my application.
 
 
 
 2015-04-14T10:52:55.0410 (3684:00D0A9F4) COMMIT_TRANSACTION
 
 
 
   C:\. . .\MYDATABASE.FDB (ATT_0, unknown_user, NONE, internal)
 
 
 
   (TRA_595, READ_COMMITTED | REC_VERSION | WAIT | READ_ONLY)
 
 
 
 
   0 ms
 
 
 
 There is no other information about TRA_595 in the whole log file. What is 
 that transaction?
 
 
 
 Thanks for the information!
 
 
 
 Hannu
 
 
 
 


Re: [firebird-support] Re: Trace cause of performance drop

2014-12-16 Thread Jesus Garcia jeg...@gmail.com [firebird-support]
2014-12-16 9:39 GMT+01:00 Mark Rotteveel m...@lawinegevaar.nl
[firebird-support] firebird-support@yahoogroups.com:

  My first suggestion would be to upgrade to 2.5.3 Update 1 and backup and
 restore your database.

Why is needed to backup + restore the database when upgrade to 2.5.3. As I
know is only necessary to avoid lock conversion denied. Is there anything
else?


Re: [firebird-support] CORE-4467

2014-06-20 Thread Jesus Garcia jeg...@gmail.com [firebird-support]


 El 20/06/2014, a las 21:33, Ivan Arabadzhiev intelru...@yahoo.com 
 [firebird-support] firebird-support@yahoogroups.com escribió:
 
 So I was redirected to the list to discuss 
 http://tracker.firebirdsql.org/browse/CORE-4467. 
  
 What I can add is that it occurred to me to run a validation on the database 
 after I get the error (I keep a copy, just in case backup/restore goes wrong).
 Result is :
 Summary of validation errors
 
 Number of record level errors   : 3
 Number of database page errors  : 1
 
 Given that backup/restore goes smoothly, I assume the errors are in metadata 
 pages (somewhere in index if the error is anything to go by).
 I`m willing to run any suggested tests that might help. The load that breaks 
 the database is reproducable but I`d really prefer not to upload a few years 
 worth of customer data (worst case scenario - I`ll scramble it and take the 
 chance).
 As I said before - up to about a month ago things have been running fine.
 


Re: [firebird-support] Is it normal for SWEEPER to take hours to finish?

2014-04-28 Thread Jesus Garcia
  Hi. Today, the users of  one of my Firebird 2.5 databases reported that
 the database works very slow. After I checked I saw that there is an
 attachment from SWEEPER user and it is doing something. The database size
 is little over 500 MB. But the sweeper is working over 2 hours now, with no
 other connections to the database and no signs to finish soon. What can I
 do? Set the sweep interval to 0, restart the Firebird server and perform
 manually backup restore? Or to wait to finish, but the users need the
 database.

 The gap between Oldest transaction and Next transaction is very big - few
 times bigger than Sweep interval, perhaps this is the reason why it
 started. But this problem is for the developers to resolve.

 There is a bug solved in firebird 2.5.3, about sweeper that may be raleted
with your case.

See http://tracker.firebirdsql.org/browse/CORE-4100


Re: [firebird-support] flamerobin access from client

2014-04-23 Thread Jesus Garcia

 I have set up a server connection on the client (server name - server, host - 
 \\server, port- 3050) and registered the database (name - DB, path - 
 \\server\, user - sysdba, password - masterkey).
 
 
Try with the connection string:

Server:c:\data\db.fdb
_
 


Re: [firebird-support] Online DDL

2014-03-23 Thread Jesus Garcia

 I had a database corruption recently and was told that it may have been 
 caused by dropping tables while the database was online with other users 
 connected. Apparently there is some kind of race condition in the page 
 allocation that can cause the same page to be allocated to different things 
 when doing that. It ONLY concern dropping tables.
What version of firebird are you using? If it is one of the latest, would be 
helpful to open a ticket in the tracker in order to be solved.
I think is a serious bug corrupt a database, and more serious if it happens 
executing DDL statements.

Jesus Garcia 
 


Re: [firebird-support] Online DDL

2014-03-22 Thread Jesus Garcia

 El 23/03/2014, a las 00:44, Carlos H. Cantu lis...@warmboot.com.br 
 escribió:
 
 It depends on what kind of changes you plan to do. Some of them still
 needs exclusive access, otherwise you may end up with an object is in
 use error.
 
 
I think Aldo asks If it is sure, because there are comments, some recent, 
that changing metadata while users connected can cause database corruption.

Of course, If object in use raises, is not a problem, only if the database stay 
in the prior state after the error, but is a problem if trying to drop a table 
can cause database corruption.

Jesus Garcia
 


Re: [firebird-support] Wrong page type, how to examine/fix?

2014-02-24 Thread Jesus Garcia
Hello, Kjell, do you know the source of the issue?

Is a reproducible error in engine what have caused the corruption?

Jesus García 



Re: [firebird-support] Very very very slow FB 2.5.2 64bit performance on Windows 2008 R2

2014-02-20 Thread Jesus Garcia
Then, If it  were only a firebird issue, all of us would have the problem.

If some of us has the problem, may be an incompatibility between FB, OS and 
hardware.

Perhaps, if we share information about our environments, the common origin of 
the problem would arise.

Jesus Angel Garcia Zarco
Cointec



Re: [firebird-support] Very very very slow FB 2.5.2 64bit performance on Windows 2008 R2

2014-02-17 Thread Jesus Garcia


 'So the only effective solution seems to disable the random access request
 (i.e. remove the FILE_FLAG_RANDOM_ACCESS flag) from the Windows API calls
 used to create/open the files. Moreover, in this case the file-system cache
 size limit should not be actual anymore, as Windows won't be expanding the
 cache out of the reasonable boundaries. The quick tests prove this solution
 being workable.'

 ...

 'Taking this into account, as well as the experience of other databases,
 this solution has been committed into Firebird 2.1.5, Firebird 2.5.2 and
 Firebird 3.0 branches.'


 This made me assume this issue wasn't the cause of our problems.  However
 by the sounds of it the fix might not be working.



We are using Windows 2008 R2 64 bits, with databases around 35 Gb, and we
solved the performance problems with FB 2.5.2. We tested it before and
after apply the patch in 2.5.2 versión and verify that the problems was
gone.

I thin you have to look up in other direction.


Re: [firebird-support] Table update performance dropped significantly within few days.

2014-01-15 Thread Jesus Garcia
2014/1/15 fabianoas...@gmail.com



 Increase database page buffers and try again.
 It happens when you combine a large table with multiple indexes.
 Dropping one or two indices can also increase speed a lot in this case.

I think, 100 million records are not so much records, and If you use
classic or superclassic, pagebuffers cannot be high.

What firebird version?
How many indices has that table?
Do you update indexed fields?

May be the problem is Firebird performance with large indices.


Re: [firebird-support] Re: Help, tunning database

2013-07-22 Thread Jesus Garcia


El 22/07/2013, a las 14:10, trskopo trsk...@yahoo.com escribió:

 Dear all,
 
 Today, I faced same problem again, which is Firebird server became not 
 responsive.
 
 Here are the latest settings :
 - win 7 64 bit
 - Firebirds 2.5.1 super server
 - page size 8192
 - page buffer 8192
 - no long transactions
 - temp cache limit set to 128MB
 - there are a few numbers errors in insert operations but all already 
 rollback.
 
 I was not restarted FB server yet. I think if I do that FB will became normal 
 again.
 
 Every times there are errors from execution of SQL statements (insert,delete 
 ,update), although transactions has been rollback, FB became not responsive.
 
 Any ideas how to solve this problem without restarting FB server?
 
 Thanks,
 Anto
 
 

Why don't you try 2.5.2?

2.5.1 has some issues corrected in 2.5.2.
 


[Non-text portions of this message have been removed]



Re: [firebird-support] Re: Help, tunning database

2013-07-15 Thread Jesus Garcia


El 15/07/2013, a las 18:23, trskopo trsk...@yahoo.com escribió:

 
 
 --- In firebird-support@yahoogroups.com, Jesús García jegaza@... wrote:
 
  El 15/07/2013, a las 16:31, trskopo trskopo@... escribió:
  
   Hi all,
   
   I have Superserver Firebird 2.5.1 installed on Win7 pro 64 bit on I7 
   2600K.
   
   When data grows, Firebird Server starting to slow down. I shutdown 
   Firebird Server, starting again without changing anything and Firebird 
   Server became smooth again.
   
   Any ideas, what is the problem with this? Firebird.conf mostly on its 
   default values except for cpuaffinity set to 15 and DefaultDbCachePages 
   set to 4096.
   
   Anto
   
   
  Probably is long running transactions. I have had this issue in two 
  scenarios. One is long running transactions that makes db slowdown and the 
  other one is when an auto sweep starts, because a long running transaction, 
  there is an issue (that will be solved in 2.5.3) that makes Firebird run 
  sweep several times.
  
  I have databases of 30 gb running fine for months without issues except 
  when there is a long running transaction. The last issue was because gbak 
  was out space and the gbak's transaction was opened for days. Our customer 
  called us because the slowdown and we killed the gbak process and then auto 
  sweep started. The sweep runned more than 2 hour (i think because the bug 
  in 2.5.2) and after that all was running fine. (When i run a manual sweep 
  in that database takes 20 minutes and does not slowdown the engine like 
  when auto sweep is started) 
  
  Jesús
  
   
  
  
  [Non-text portions of this message have been removed]
 
 
 Thanks for your reply.
 
 How do I check that there is a long transaction running?
 
 Anto
 

Select * from mon$transactions for example
 


[Non-text portions of this message have been removed]



Re: [firebird-support] GBak Backup Restore Problem

2013-06-25 Thread Jesus Garcia
Hello, I think you have a row with null value. The option is update table
set column = 0 where column is null and then try to backup restore. I have
seen this issue when changing columns from null to not null and you have
rows in the table.


2013/6/25 Tupy... nambá anhangu...@yahoo.com

 **




 Dear Friends,

 We have a strange problem with GBak. We make a backup with gbak and then a
 restore, also with the same.

 We have a table with 60 rows where a not null type SmallInt column has 0
 (zero) as content.

 When restoring, GBak returns null for this column. As this column is not
 null, we get an error message (Error: Validation error for column .).

 Between these two steps (backup and restore), no further action is done
 with the backup file.

 I ask you = What can cause this problem? Is there any solution for this?
 Any idea about this problem?

 Thanks a lot,
 Roberto Camargo,
 Rio de Janeiro / Brasil

 [Non-text portions of this message have been removed]

  



[Non-text portions of this message have been removed]





++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

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

++
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:
http://docs.yahoo.com/info/terms/



Re: [firebird-support] There are risks accessing a database with two servers?

2013-04-26 Thread Jesus Garcia

 it seems possible and desirable to have 2 Servers, one for long running
 reports (probably using Classic) and another for the other tasks (using
 SuperServer)
 
 Is that right?
 

Classic server can't open a database opened by superserver, because SS opens it 
exclusive mode.

May be the article refer to two classic servers accessing the same db.

Jesús 
 


[Non-text portions of this message have been removed]



Re: [firebird-support] Delphi XE2. Migrating from IBX components

2013-03-08 Thread Jesus Garcia

 Hello I have all my apps in Delphi with the IBX components and ClientDataSets 
 to conect with a FB Database. Since long time ago IBX creator says it doesn't 
 support FB. So far I can work with very simple queries fine. But now I'd like 
 to use a component which supports FB.
 
 I'd like to hear some opinions regarding what component to use in Delphi. Is 
 there any free one? Thanks in advance!
 
 Sergio
 

Hello sergio, i'm in the same process. We have selected IBDac from devart, but 
have not started the migration. There is a migration tool from ibx that 
automates a lot of work.


About ibx, we also saw a problem in the components. The problem is that the 
first time it opens a dataset or ibquery, starts one transaction to recover the 
calculated fields and the fields that compounds the pk. When one datamodule 
opens 30 datasets, the first time ibx starts 30 transactions. With a lot of 
users and a lot of datamodules there is a lot of delay opening the first time 
the datasets.

Jesús 
 


[Non-text portions of this message have been removed]



Re: [firebird-support] Re: Scaling up Firebird-2.5.2.26539_0_x64.exe

2013-02-08 Thread Jesus Garcia

 
 Firebird can handle more than 10 concurent users here is an example with 
 a production system http://www.firebirdnews.org/?p=6797
 
 __,_._,_
There are not 10 concurrent users, are 10 end users using 2500 pooled 
connections, then there are 2500 concurrent users máximum., that are a lot.

Regards, Jesús 
 __
 


[Non-text portions of this message have been removed]



Re: [firebird-support] Re: RES: Version number

2012-11-22 Thread Jesus Garcia
 This is also possible, but only if you migrate not to the official
 v2.5.2 release but to some earlier snapshot build.

 Dmitry

 One question Dimitry. We have some quite large databases and cannot do a
backup restore cycle. Also rebuild indices may take so much time.
What kind of indices has to be rebuilded?
All? Compound indices? Compound indices with nullable fields?
If not doing backup/restore, rebuild PK indices is complicated.


[Non-text portions of this message have been removed]



Re: [firebird-support] Re: firebird.conf improve for lot of memory

2012-10-29 Thread Jesus Garcia
How many simultaneous users?
What database size?
How complex is metadata?


Re: [firebird-support] page 2226658, page type 5 lock denied (216)

2012-09-27 Thread Jesus Garcia
El 27/09/2012, a las 17:08, Ann Harrison aharri...@ibphoenix.com escribió:
 
 Page type 5 is a data page. What you ran into was an internal deadlock
 that was recognized and your process lost. The problem was entirely in
 memory, so no, I wouldn't worry about datbase corruption. In theory,
 Firebird should never have an internal deadlock. You've just seen a
 difference between theory and practice. As processors get faster and loads
 get heavier, more cases that were overlooked previously turn out to be
 possible in fact. Without a repeatable test or a core dump, these problems
 are very hard to diagnose. So if it happens once, chalk it up to bad luck.
 If it happens repeatedly, be prepared to work with the core developers.
 
 Good luck,
 
 Ann
 
I have observed this behaviour in firebird 2.5.2, when query monitoring tables 
with a heavy load. 

Don't know if this is the case, but if it is, there is a way to look for.

Jesus 
 


[Non-text portions of this message have been removed]



Re: [firebird-support] Re: The worst day i can have with firebird

2012-07-10 Thread Jesus Garcia


 60 transactions / day, uniformly distributed means ~ 7 transactions
 per second, which is nothing. I'm sure you don't have that pattern in
 production, thus e.g. the most busy hour in respect to transaction
 throughput might be interesting.


I know 7 transactions seconds and peaks of 20/30 transactions seconds
firebird can handle. The problem was trying to delete one attachment, while
(may be) one of these peaks. I tried first to delete the transaction and i
couldn't, raises an error. Then I tried to delete the attachment. When the
engine crash, there was no input in Firebird.log, i used windows event
viewer to verify it. May be there is a bug trying to delete one attachment,
and the transactions linked to it, while there is a lot of transactions
created and destroyed, but is complicated for me to reproduce it.

The system was running in production one day with this workload with good
performance and the same amount of transactions, with the only problem of
page conversion.

Jesus


[Non-text portions of this message have been removed]



Re: [firebird-support] Newbie: Viewing system users

2012-07-10 Thread Jesus Garcia
2012/7/10 Danie van Eeden vaneeden.da...@gmail.com

 **

 I will connect to security2.fdb to locate the users table and will post
 If I have trouble


I think you can't connect no more to security2.fdb with firebird 2.5. You
will have to get users trough API.

Regards, Jesus


[Non-text portions of this message have been removed]



Re: [firebird-support] Re: The worst day i can have with firebird

2012-07-07 Thread Jesus Garcia
 The Trace API is an underestimated new feature in 2.5, but a godsend to 
 analyze such situations.
 
I must say I have used the lite version of your fbtracemanager tool.
 
 Sounds a bit like running the query in a transaction with auto commit 
 turned on. You might see COMMIT_RETAIN in the trace output for an 
 auto-committed transaction, as this usually is the default option in the 
 various access layers when using auto commit.
 
 
The problem is that the query must be executed When master/detail data is 
loaded, and is executed after and using transaction for each query.

Regards, jesus
 


[Non-text portions of this message have been removed]



[firebird-support] page type @ lock denied

2012-07-06 Thread Jesus Garcia
Hello, i'm using Firebird 2.5.2 Superclassic in windows 2008 R2 64 bits.
The system runs for two days, and i have seen in firebird log this entries
in the first work day:

 Thu Jul 05 11:52:59 2012
 Database: Gestlab
 page 1296554, page type 4 lock denied (216)
 Thu Jul 05 13:36:41 2012
 Database: Gestlab
 page 1223025, page type 5 lock denied (216)

What is the problem?
Regards,Jesus


[Non-text portions of this message have been removed]



[firebird-support] The worst day i can have with firebird

2012-07-06 Thread Jesus Garcia
Two days ago, we moved from one server with interbase 2009 windows 2003 and
4 Gb RAM to Firebird 2.5.2 Superclassic, 16 Gb RAM
The database is around 21 Gb, and yesterday seems all was running fine.

Today, i have checked Firebird.log and i have seen that there is an error
of type
1296554 page type 4 lock denied (216), and page type 4 lock denied in
another page, that are logged from .

viewing monitoring tables, i have seen on transaction  opened for 4 hours,
and i have tried to delete de attachment. When i have deleted it, firebird
has crashed and around 130 users has been dropped. After that in
Firebird.log, i see no information about the crash, and i don't know what
can happen, and what to do, and where look up for the reason of the problem.

After that crash, I see in the log page 1296554, page type 4 lock
conversion denied (215), and don'n know what to do with this errors.

Another problem is that transactions_id jumps, 2, and 3 in one
minute.

Any help or idea appreciated.
Regards, Jesus


[Non-text portions of this message have been removed]



Re: [firebird-support] Server

2012-06-07 Thread Jesus Garcia
What is the memory consumption?

I have had the same error When firebird reach near 2 gb RAM.

Jesus Angel Garcia Zarco
Cointec
Correo Móvil

El 07/06/2012, a las 11:38, Michael Vilhelmsen 
michael.vilhelm...@microcom.dk escribió:

 I have a server running windows 2003 32 bits. 
 
 On this server Firebird 2.1 32 bits is running. 
 
 A few months ago we opened up for an external company, so they could gain 
 access to the DB. 
 In this DB I have made som database triggers, which basicly just inserts a 
 record when they connect, disconnet, start, commit and rollback a transaction.
 
 There connection will do this (Using user WEBESCON):
 
 WEBESCON Commit Trans 6/6/2012 2499515 1735.774
 WEBESCON Login 6/6/2012 859 0.59
 WEBESCON Logout 6/6/2012 858 0.595
 WEBESCON Start Trans 6/6/2012 2499516 1735.775
 WEBESCON Commit Trans 6/7/2012 657036 456.275
 WEBESCON Login 6/7/2012 232 0.161
 WEBESCON Logout 6/7/2012 231 0.160
 WEBESCON Start Trans 6/7/2012 657035 456.274
 
 These are the number of connect(Login), disconnect(Logout) and transactions.
 As you can see they are connecting/disconnection some 1700+ times each minute 
 duing the entire day. In my eyes its an total overkill.
 
 Here you can see an average of our own users (which are actually 
 serviceprograms running).
 
 DWIUSER Commit Trans 6/6/2012 32384 22.48
 DWIUSER Start Trans 6/6/2012 18054 12.53
 DWIUSER Commit Trans 6/7/2012 8297 5.761
 DWIUSER Start Trans 6/7/2012 4347 3.018
 ESCONSERVICE Commit Trans 6/6/2012 607 0.421
 ESCONSERVICE Login 6/6/2012 286 0.198
 ESCONSERVICE Logout 6/6/2012 286 0.198
 ESCONSERVICE Start Trans 6/6/2012 607 0.421
 ESCONSERVICE Commit Trans 6/7/2012 171 0.118
 ESCONSERVICE Login 6/7/2012 79 0.054
 ESCONSERVICE Logout 6/7/2012 79 0.054
 ESCONSERVICE Start Trans 6/7/2012 171 0.118
 
 This morning (and some 10-12 times more the last 3-4 days) the server died 
 with this:
 
 DBSRV03 (Server) Thu Jun 07 06:06:02 2012
 Database: ThreadData::start() failed:
 operating system directive _beginthreadex failed
 Not enough storage is available to process this command.
 
 Which I believe is out of memory problem. 
 
 Is it correct to believe that they can cause this to happen?
 This server and customer has been running with Firebird sinse version 1.00 
 (some 9 years) without any problems. All problems has begun after the new 
 company has started to connect.
 
 Michael
 
 


[Non-text portions of this message have been removed]



Re: [firebird-support] Firebird 2.5 (64 bit), strange SQL result

2012-05-08 Thread Jesus Garcia
I also have seen that in ERRLOG table you have the entry

DT USR MSG ERR_AT
29/04/2012 x!JKmn validation error for column ID_DIV_LC, value *** null
*** 29/04/2012 17:00:02

Regards, Jesus


[Non-text portions of this message have been removed]



Re: [firebird-support] OIT / NT

2012-03-31 Thread Jesus Garcia



 Hello, Tiberiu!
 
 Friday, March 30, 2012, 12:13:06 PM, you wrote:
 
 TH which) somehow foods my server. While this client is using my
 TH software, somehow the gap between OIT and NT increases 200 transactions 
 each 5 seconds. I
 
 Other people noted lot of things, but I want to ask - what do you do
 in the application, that it generates 40 transactions per second?
 I mean, it's some kind of robot, inserting bulk data, or it is a
 human, typing data with non-human speed?
 
 Firebird does not generates transactions, so, all these transactions
 are coming only from your application.
 
 
O don't know If is firebird or not but i have had the same problem wiith 
ibx+delphi+interbase 2009. I have had jumps of 2 transactions, and of 
course is imposible by the kind of our app generate 2 transactions in 
seconds. I have observes it, but I have not been able To reproduce it .

Jesus

 __,_.


[Non-text portions of this message have been removed]



Re: Re[2]: [firebird-support] OIT / NT

2012-03-31 Thread Jesus Garcia


 Sorry guys, I don't believe in magic or some spy applications, that
 suddenly generates lot of transactions.
 One of the cases like that, when some application started to generate
 millions transaction per day, was the programmer's fault, when
 he forgot to construct web page content from the database in one
 transation. Instead, his code produced start/commit at each
 web page element, and there were lot of elements.
 So, this is just the result of bad transaction control in application.



I also don't belive in magic, when talking about computer science, but is
not a programmer error. I have to say that i have seen it after backup and
restore cycle. Just starting to work our customers with the application, i
saw jumps of a big number of transactions. In my case we control the
transactions in all the application, and active/desactive them when we need
it. I have not seen that behaviour with firebird, but with Interbase 2009
yes. I thought it was a bug, like others in IB, and i could not reproduce
it.

Regards,
Jesus


[Non-text portions of this message have been removed]



[firebird-support] Understanding memory usage in classic server

2012-03-07 Thread Jesus Garcia
Hello, i'm trying to understand the memory usage with classic server 2.5.2,
cache pages 300.

Our production database, once one form is opened, uses 12 Kb memory,
and the memory is allocated the first time a form that open a set of tables
that is related with many other tables in the database with triggers. I
think the memory allocation is for metadata, because just preparing the
querys, the memory consumption increases.

Once that table is opened, the memory usage for fb_inet_server is between
12 Kb and 13 Kb. That makes the memory consumption for 150 users
around 20-24 Gb.

I close the form, the transaction and the tables, and the memory
consumption is the same, but after some minutes i see that the memory
consumption decreases and uses between 8 and 15 Mb. After that if i reopen
again the form that opens the tables that makes fb_inet_server uses a lot
of memory, then the memory consumption in fb_inet_server is between 20 Mb
and 30 Mb, what i see normal.

How works the memory allocation in fb_inet_server? is there any way to
avoid that high memory consumption or force free unused memory, that i
think is allocated for load metadata?

Regards, Jesus


[Non-text portions of this message have been removed]



Re: [firebird-support] Firebird classic vs supperclassic

2011-12-17 Thread Jesus Garcia

 The thing with SC is, when something bad happens in a connection, which
 crashes the server, e.g. due to a bug in the engine or a faulty UDF, all
 connections are affected. This is probably the reason why people still
 prefer Classic over SC. SC might be easier to manage, because you only
 see one process in the task manager and according to some benchmarks, SC
 seems to be a bit faster than Classic.

 I guess you know this architecture comparison sheet already?
 http://www.firebirdsql.org/file/fb25_architecture_comparison.pdf

 --
 With regards,
 Thomas Steinmaurer


Hello Thomas, i have read it. I know people still prefer Classic, but i
think that there has been time and effort to develop the Superclassic model
and now people does not trust in like in classic. Also i have read people
that say that superserver is not for production, but i use it in production
servers since 1.0 and now in 2.5, and until know i have not had any
problems and is working for months 24/7 without issues. Now i have one
bigger client and i have to select one of two models. I have readed
comparisons, benchmark but searching no information of community feedback.

What i tried is get people experience in using both architectures and
feedback of their use. The feedback of people is very interesting for the
community.

Regards, Jesus


[Non-text portions of this message have been removed]



Re: [firebird-support] Checking if scripts ran correctly

2011-12-06 Thread Jesus Garcia

  Just found a remote database that did not have a field in a table which
 had been added some 4 or so scripts ago. That makes me suspect of all
 script updates.

 What is the fastest and most reliable way to check all my deployed
 databases (say 200 of them) to see if all the scripts have run correctly
 and applied the changes, or created triggers and procedures, contained in
 previously run scripts?

 Do I need a commercial product that can help? Or do I just have to visit
 each location and check the database structures manually?


I use one script component developed by me that uses IBX. What i do is
save a log file with the exceptions raised when runing the script. After
running the scripts, i see that log files. It is not complicated to send
the scripts by email, for example, after running the scripts.

I think is not necessary a commercial component, just logging the
exceptions when running the scripts and analyze them.

Jesus


[Non-text portions of this message have been removed]



Re: [firebird-support] Re: FB 2.5 takes too much RAM

2011-10-27 Thread Jesus Garcia


 Hi Sean,

 I have just installed FB 2.5.1, but the problem still exists. Haven't the
 bug been fixed in FB 2.5.1?

 Regards

 Guido


I opened the ticket, but i have not tested if it really solves the problem.
When i opened the ticket, fb2.5 uses 47% more RAM than 2.1.4, now
(2.5.1,2.5.2) uses 29% more than 2.1, what means that the memory consumption
has been decreased, but not as 2.1. I have commented in the tracker if is
still normal the difference between 2.1 and 2.5.

Regards, Jesus


[Non-text portions of this message have been removed]



Re: [firebird-support] division by zero in FB2.5

2011-10-24 Thread Jesus Garcia
What is the value of mmbtu?

Jesus Angel Garcia Zarco
Cointec
Correo Móvil

El 24/10/2011, a las 17:18, Alan J Davies alan.dav...@aldis-systems.co.uk 
escribió:

 Hi, has there been a change in the way division is done since FB 2.1
 I realise I may be asking this question in the wrong list, but here goes.
 I have an SP which has been running since Feb 2009 every month with not 
 one failure. Moving this to FB 2.5 results in failure every time. 
 Basically all my routines are wrapped inside a coalesce statement such 
 as this:
 
 water_tons = iif(water_pc=0,0,coalesce(tons*water_pc/100,0)),
 tons_water_tons = iif(water_pc=0,0.01,tons),
 ash_tons = iif(ash_pc=0,0,coalesce(tons*ash_pc/100,0)),
 tons_ash_tons = iif(ash_pc=0,0.01,tons),
 
 mmbtu_$ = iif(total_$=0 or tons=1,0,coalesce(round(total_$/mmbtu,2),0)),
 
 Have I consistently got this wrong and have just been lucky or have I 
 coded this completely wrong and the divide an integer by zero happens 
 because the calculation order is different?
 The error message is
 Arithmetic overflow or division by zero has occurred
 ..
 The code attempted to divide an integer value by an integer divisor of zero.
 
 Any help or advice on defensive coding in a different way gratefully 
 accepted.
 
 Regards
 Alan
 
 -- 
 Alan J Davies
 Aldis
 


[Non-text portions of this message have been removed]



[firebird-support] Shutdown engine with an exception inside a udf dll

2011-09-08 Thread Jesus Garcia
Hello, is normal to crash the engine whe an exception is raised inside a udf 
dll or must be catch by the engine?

I had a udf with the function power. If i call power with a negative valué in 
the base parameter an exception is raised and the engine is stopped. Why not 
catch the exception To prevent the problem and raise it like any exception?

I think this is a bug in the engine.

Jesus Angel Garcia Zarco
Cointec
Correo Móvil

Re: [firebird-support] Re: Is Firebird 2.5 support running on multi core processors?

2011-08-27 Thread Jesus Garcia


 In Firebird 2.5 release note, I read this note :
 
 The default CpuAffinity setting still binds SuperServer to a single 
 processor only. In order to take advantage
 of this improvement when working with multiple databases, this setting should 
 be changed in
 firebird.conf
 
 It means, Superserver supported for multicore, right?
 
Yes, but only If you have multiple databases on the same server and each 
database only use one core.

Jesus
 


[Non-text portions of this message have been removed]