Re: [firebird-support] Firebird vs. PostgreSQL

2018-11-06 Thread Fabiano Bonin fabiano.bo...@personalsoft.com.br [firebird-support]
Firebird doesn't support schemas.
This is the main reason I am replacing it by PostgreSQL in all my projects.

In versions prior to 3.0, there is a limit on SQL instruction size, what
makes it hard to use with frameworks like Hibernate, which tends to
generate huge SQL instructions.
But this is solved in version 3.0, so you should disconsider this one if
you are using this version.

There is a 31 characters table name limit, the can bring some restrictions
if you are planning to create a multi-database application and you use big
table names.

But, if your project will be bound to a single database, you can live with
these issues.

The advantages I see on Firebird over PostgreSQL is single file database,
great charset and collation support, easiest to mantain, doesn't bring a
bunch of features you will never use, small installation size.

Regards,




Em ter, 6 de nov de 2018 às 11:10, Kjell Rilbe
kjell.ri...@marknadsinformation.se [firebird-support] <
firebird-support@yahoogroups.com> escreveu:

>
>
> Hi,
>
> We've been using Firebird "forever". For upcoming projects and also
> possible replacement in existing ones, we're considering PostgreSQL.
>
> What would you say is the pros and cons of Firebird vs. PostgreSQL?
>
> I'm aware that the answers may very well be different depending on
> application and usage patterns, but I would like to start with
> considerations i general terms, e.g. framework support (e.g. Entity
> Framework), admin tools availability and usability (Windows and possibly
> Mac), query performance in general, resource load, SQL standard compliance,
> stability, development progress (new features, fixing bugs, ...) etc.
>
> Mvh,
> Kjell
>
> [cid:part1.5A72A320.2CD4BAEA@marknadsinformation.se]
>
> Kjell Rilbe
> Telefon: 08-761 06 55
> Mobil: 0733-44 24 64
>
> Marknadsinformation i Sverige AB
> Ulvsundavägen 106C
> 168 67 Bromma
> www.marknadsinformation.se
> 08-514 905 90
>
> [Företagskontakt.se]
> [Personkontakt.se]
>
> [Non-text portions of this message have been removed]
>
> 
>


Re: [firebird-support] Firebird using all available memory

2018-05-24 Thread Fabiano Bonin fabiano.bo...@personalsoft.com.br [firebird-support]
> Perhaps Debian is trying to put in cache your database file and this file 
> cache is competing for the available memory with the page cache of Firebird.

root@debian:~# ps -p 509 -o %cpu,%mem,cmd
%CPU %MEM CMD
93.3 69.8 /opt/firebird/bin/firebird

root@debian:~# free -h
  totalusedfree  shared  buff/cache   available
Mem:   7.8G5.5G2.0G 19M273M2.0G
Swap:0B  0B  0B

Firebird is using 69.8% of the available memory. OS cache is using
273MB, so I don't think this is the case.
I tried to read the descriptions of FileSystemCacheSize and
FileSystemCacheThreshold parameters, but i didn't get what they do
exactly.
Anyway, it says FileSystemCacheThreshold is used just on Windows OS
and FileSystemCacheSize also depends of FileSystemCacheThreshold .

In this server, I am using 25% of the available RAM to
DefaultDbCachePages and 12.5% to TempCacheLimit.

DefaultDbCachePages = 524288
TempCacheLimit = 1024M

My database uses 4k page size, so 524,288 pages * 4k = 2,097,152 (2GB)

So 2GB for DefaultDbCachePages and 1GB for TempCacheLimit, with a 3GB
total alocated memory.

But as you can see above, currently it is using 5.5GB, and usually it
is growing up to the memory limit and overflowing...
I would expect that using the configuration above the memory use would
be around 3GB, but again, I can be mistaked about how firebird uses
the memory.
Maybe these settings affects just the shared memory and each
connection also uses some private memory...
I just want to understand what is going on to be able to calculate how
my settings will affect memory use and to prevent overflows...

I tried to see the memory use per thread, and currently there are 2
threads using a bunch of memory (numbers are in KB).
I am not skilled enough to analyze what these numbers are saying tough.

Address   Kbytes RSS   Dirty Mode  Mapping

7fa143f3d000 2423564 2423524 2423524 rw---   [ anon ]
7fa1e7d57000 4517776  324472  324472 rw---   [ anon ]

 --- --- ---
total kB 13417556 5700308 5682240

Regards,

Fabiano

>
>
> In Firebird 2.5(unfortunately I don't know Firebird 3) the parameters to 
> control the comsuption of memory for the file cache are:
>
> FileSystemCacheSize
> FileSystemCacheThreshold
>
>
> On Thursday, May 24, 2018, 8:30:09 AM CDT, Fabiano Bonin 
> fabiano.bo...@personalsoft.com.br [firebird-support] 
> <firebird-support@yahoogroups.com> wrote:
>
>
>
>
> Hi, Omacht!
>
> Indeed, it needs a sweep.
>
> There a scheduled script that runs every night to sweep the database, and it 
> broke with FB3 upgrade.
>
> I fixed the script and it will run this night.
>
> But, do you think the memory exaustion can be related to this issue?
>
> Regards,
>
> Fabiano
>
>
>
>
> 2018-05-24 2:47 GMT-03:00 Omacht András aoma...@mve.hu [firebird-support] 
> <firebird-support@yahoogroups.com>:
>
>
>
> Hi Fabiano!
>
> You should run garbage collection (sweep).
>
>
> Oldest transaction 905
> Oldest active 62303005
> Oldest snapshot 62303005
> Next transaction 62382577
> András
>
> OMACHT ANDRÁS
> fejlesztési igazgató
>
> [cid:image001.png@01CFE703. C881C660]
> Libra Szoftver Zrt.
> 1113 Budapest, Karolina út 65.
> Tel.: +36 1 255 3939
> Fax: +36 1 209 1477
> http://www.libraszoftver.hu
>
> From: firebird-support@yahoogroups. com [mailto:firebird-support@ 
> yahoogroups..com]
> Sent: Wednesday, May 23, 2018 4:29 PM
> To: firebird-support@yahoogroups. com
> Subject: Re: [firebird-support] Firebird using all available memory
>
>
> Hi, Thomas. It is zero. I presume in this case it uses the system default, 
> right?
>
> Regards,
>
> Fabiano
>
> Database header page information:
> Flags 0
> Generation 62390727
> System Change Number 0
> Page size 4096
> ODS version 12.0
> Oldest transaction 905
> Oldest active 62303005
> Oldest snapshot 62303005
> Next transaction 62382577
> Sequence number 0
> Next attachment ID 1290314
> Implementation HW=AMD/Intel/x64 little-endian OS=Linux CC=gcc
> Shadow count 0
> Page buffers 0
> Next header page 0
> Database dialect 3
> Creation date Apr 4, 2018 7:03:44
> Attributes force write
>
>
> [A képet a feladó eltávolította.]
>
> 2018-05-22 18:30 GMT-03:00 'Thomas Kragh-Pedersen (TKG)' 
> t...@kmd.dk<mailto:t...@kmd.dk> [firebird-support] 
> <firebird-support@yahoogroups. com<mailto:firebird-support@ yahoogroups.com>>:
>
> Hey Fabiano
> Perhaps DefaultDbCachePages is overwritten by database header information.. 
> Gstat -h will tell you that. Look for “Page buffers”
>
>
> From: firebird-support@yahoogroups. com&l

Re: [firebird-support] Firebird using all available memory

2018-05-24 Thread Fabiano Bonin fabiano.bo...@personalsoft.com.br [firebird-support]
Hi, Omacht!

Indeed, it needs a sweep.

There a scheduled script that runs every night to sweep the database, and
it broke with FB3 upgrade.

I fixed the script and it will run this night.

But, do you think the memory exaustion can be related to this issue?

Regards,

Fabiano




2018-05-24 2:47 GMT-03:00 Omacht András aoma...@mve.hu [firebird-support] <
firebird-support@yahoogroups.com>:

>
>
> Hi Fabiano!
>
> You should run garbage collection (sweep).
>
>
> Oldest transaction 905
> Oldest active 62303005
> Oldest snapshot 62303005
> Next transaction 62382577
> András
>
> OMACHT ANDRÁS
> fejlesztési igazgató
>
> [cid:image001.png@01CFE703.C881C660]
> Libra Szoftver Zrt.
> 1113 Budapest, Karolina út 65
> <https://maps.google.com/?q=1113+Budapest,+Karolina+%C3%BAt+65=gmail=g>.
>
> Tel.: +36 1 255 3939
> Fax: +36 1 209 1477
> http://www.libraszoftver.hu<http://www.libraszoftver.hu/>
>
> From: firebird-support@yahoogroups.com [mailto:firebird-support@
> yahoogroups..com]
> Sent: Wednesday, May 23, 2018 4:29 PM
> To: firebird-support@yahoogroups.com
> Subject: Re: [firebird-support] Firebird using all available memory
>
>
> Hi, Thomas. It is zero. I presume in this case it uses the system default,
> right?
>
> Regards,
>
> Fabiano
>
> Database header page information:
> Flags 0
> Generation 62390727
> System Change Number 0
> Page size 4096
> ODS version 12.0
> Oldest transaction 905
> Oldest active 62303005
> Oldest snapshot 62303005
> Next transaction 62382577
> Sequence number 0
> Next attachment ID 1290314
> Implementation HW=AMD/Intel/x64 little-endian OS=Linux CC=gcc
> Shadow count 0
> Page buffers 0
> Next header page 0
> Database dialect 3
> Creation date Apr 4, 2018 7:03:44
> Attributes force write
>
>
> [A képet a feladó eltávolította.]
>
> 2018-05-22 18:30 GMT-03:00 'Thomas Kragh-Pedersen (TKG)' t...@kmd.dk
> <mailto:t...@kmd.dk> [firebird-support] <firebird-support@yahoogroups.com
> <mailto:firebird-support@yahoogroups.com>>:
>
> Hey Fabiano
> Perhaps DefaultDbCachePages is overwritten by database header information..
> Gstat -h will tell you that. Look for “Page buffers”
>
>
> From: firebird-support@yahoogroups.com<mailto:firebird-support@
> yahoogroups.com> <firebird-support@yahoogroups.com firebird-support@yahoogroups.com>>
> Sent: 18. maj 2018 16:12
> To: 
> firebird-support@yahoogroups.com<mailto:firebird-supp...@yahoogroups...com>
>
> Subject: [firebird-support] Firebird using all available memory
>
>
> Hi,
>
> I have a Debian 9 Linux server with 8GB of memory, a database with 30GB,
> page size 4KB, and Firebird 3.0.3 running in superserver mode and about
> 150-200 concurrent connections.
>
> In my firebird.conf I have changed the following properties:
>
> DefaultDbCachePages = 524288 # 2GB
> TempCacheLimit = 1024M # 1GB
> LockMemSize = 2M
>
> As superserver uses a shared cache, I presumed the total used memory
> should stay between 3GB and 4GB, but it keeps growing during the day until
> it reaches the 8GB limit and Firebird shuts down with this message:
>
> debian Fri May 18 10:45:35 2018
> Shutting down the server with 150 active connection(s) to 2 database(s), 0
> active service(s)
>
> I am checking the active transactions during the day, and altought there
> are some old (2h to 3h) active transactions, I don't that an old active
> transaction should cause this, but I am reporting anyway, maybe it is
> relevant.
>
> Do someone have some advice to what should I do to prevent this from
> happening?
>
> Maybe my understanding about how Firebird uses memory is incorrect, so any
> advice about how I should calculate the required amount of memory needed is
> welcome.
>
> PS: I have migrated from FB 2.5 recently (previously I did use
> superclassic mode), and these problems started after the migration.
>
> Regards,
>
> Fabiano
>
> Vi gør opmærksom på, at denne e-mail kan indeholde fortrolig information.
> Hvis du ved en fejltagelse modtager e-mailen, beder vi dig venligst
> informere afsender om fejlen ved at bruge svarfunktionen. Samtidig beder vi
> dig slette e-mailen i dit system uden at videresende eller kopiere den.
> Selvom e-mailen og ethvert vedhæftet bilag efter vores overbevisning er fri
> for virus og andre fejl, som kan påvirke computeren eller it-systemet,
> hvori den modtages og læses, åbnes den på modtagerens eget ansvar. Vi
> påtager os ikke noget ansvar for tab og skade, som er opstået i forbindelse
> med at modtage og bruge e-mailen.
>
> Please note that this message may contain confidential information. If you
> have received thi

Re: [firebird-support] Firebird using all available memory

2018-05-23 Thread Fabiano Bonin fabiano.bo...@personalsoft.com.br [firebird-support]
Hi, Javier.

2018-05-23 12:29 GMT-03:00 Javier Cintron fcintr...@yahoo.com
[firebird-support] <firebird-support@yahoogroups.com>:

>
>
>
> Do you have several Firebird installations(instances) in the same machine?
> Perhaps firebird is reading a different firebird.conf.
>

No, just one.


> Why don't you post your complete firebird.conf?
>
>
Because all other configurations are using the defaults. Anyway, here is it:

#DatabaseAccess = Full

#RemoteAccess = true

#ExternalFileAccess = None

#UdfAccess = Restrict UDF

#TempDirectories =

#AuditTraceConfigFile =
#MaxUserTraceLogSize = 10

DefaultDbCachePages = 524288 # 2GB (memória em M / 4 * 1024 / page size em
K)
#DatabaseGrowthIncrement = 128M
#FileSystemCacheThreshold = 64K
#FileSystemCacheSize = 0
#RemoteFileOpenAbility = 0
#TempBlockSize = 1M
TempCacheLimit = 1024M # 1GB (memória em M / 8)

AuthServer = Srp, Legacy_Auth
#AuthClient = Srp, Win_Sspi, Legacy_Auth
UserManager = Srp, Legacy_UserManager
#TracePlugin = fbtrace
#WireCryptPlugin = Arc4
#KeyHolderPlugin =
#AllowEncryptedSecurityDatabase = false
#Providers = Remote,Engine12,Loopback

#DeadlockTimeout = 10

#MaxUnflushedWrites = 100
#MaxUnflushedWriteTime = 5

#BugcheckAbort = 0

#RelaxedAliasChecking = 0

#ConnectionTimeout = 180
WireCrypt = Enabled
#WireCompression = false
#DummyPacketInterval = 0

#RemoteServiceName = gds_db
#RemoteServicePort = 3050
#RemoteAuxPort = 0
#TcpRemoteBufferSize = 8192
#TcpNoNagle = 1
#IPv6V6Only = 0
#RemoteBindAddress =

LockMemSize = 2M
#LockAcquireSpins = 0
#LockHashSlots = 8191
#EventMemSize = 64K

#CpuAffinityMask = 0

#GCPolicy = combined

#SecurityDatabase = $(dir_secDb)/security3.fdb

#GuardianOption = 1

#ProcessPriorityLevel = 0

#IpcName = FIREBIRD
#RemotePipeName = interbas

#Redirection = 0

ServerMode = Super


>
> On Wednesday, May 23, 2018, 9:29:30 AM CDT, Fabiano Bonin
> fabiano.bo...@personalsoft.com.br [firebird-support] <
> firebird-support@yahoogroups.com> wrote:
>
>
>
>
> Hi, Thomas. It is zero. I presume in this case it uses the system default,
> right?
>
> Regards,
>
> Fabiano
>
> Database header page information:
> Flags   0
> Generation  62390727
> System Change Number0
> Page size   4096
> ODS version 12.0
> Oldest transaction  905
> Oldest active   62303005
> Oldest snapshot 62303005
> Next transaction62382577
> Sequence number 0
> Next attachment ID  1290314
> Implementation  HW=AMD/Intel/x64 little-endian OS=Linux
> CC=gcc
> Shadow count0
> Page buffers0
> Next header page0
> Database dialect3
> Creation date   Apr 4, 2018 7:03:44
> Attributes  force write
>
>
>
>
>
> 2018-05-22 18:30 GMT-03:00 'Thomas Kragh-Pedersen (TKG)' t...@kmd.dk
> [firebird-support] <firebird-support@yahoogroups.com>:
>
>
>
> Hey Fabiano
>
> Perhaps DefaultDbCachePages is overwritten by database header
> information. Gstat -h will tell you that. Look for “Page buffers”
>
>
>
>
>
> *From:* firebird-support@yahoogroups. com
> <firebird-support@yahoogroups.com> <firebird-support@yahoogroups. com
> <firebird-support@yahoogroups.com>>
> *Sent:* 18. maj 2018 16:12
> *To:* firebird-support@yahoogroups. com <firebird-support@yahoogroups.com>
> *Subject:* [firebird-support] Firebird using all available memory
>
>
>
>
>
> Hi,
>
>
>
> I have a Debian 9 Linux server with 8GB of memory, a database with 30GB,
> page size 4KB, and Firebird 3.0.3 running in superserver mode and about
> 150-200 concurrent connections.
>
>
>
> In my firebird.conf I have changed the following properties:
>
>
>
> DefaultDbCachePages = 524288 # 2GB
>
> TempCacheLimit = 1024M # 1GB
>
> LockMemSize = 2M
>
>
>
> As superserver uses a shared cache, I presumed the total used memory
> should stay between 3GB and 4GB, but it keeps growing during the day until
> it reaches the 8GB limit and Firebird shuts down with this message:
>
>
>
> debian  Fri May 18 10:45:35 2018
> Shutting down the server with 150 active connection(s) to 2
> database(s), 0 active service(s)
>
>
>
> I am checking the active transactions during the day, and altought there
> are some old (2h to 3h) active transactions, I don't that an old active
> transaction should cause this, but I am reporting anyway, maybe it is
> relevant.
>
>
>
> Do someone have some advice to what should I do to prevent this from
> happening?
>
>
>
&g

Re: [firebird-support] Firebird using all available memory

2018-05-23 Thread Fabiano Bonin fabiano.bo...@personalsoft.com.br [firebird-support]
Hi, Thomas. It is zero. I presume in this case it uses the system default,
right?

Regards,

Fabiano

Database header page information:
Flags   0
Generation  62390727
System Change Number0
Page size   4096
ODS version 12.0
Oldest transaction  905
Oldest active   62303005
Oldest snapshot 62303005
Next transaction62382577
Sequence number 0
Next attachment ID  1290314
Implementation  HW=AMD/Intel/x64 little-endian OS=Linux
CC=gcc
Shadow count0
Page buffers0
Next header page0
Database dialect3
Creation date   Apr 4, 2018 7:03:44
Attributes  force write





2018-05-22 18:30 GMT-03:00 'Thomas Kragh-Pedersen (TKG)' t...@kmd.dk
[firebird-support] <firebird-support@yahoogroups.com>:

>
>
> Hey Fabiano
>
> Perhaps DefaultDbCachePages is overwritten by database header
> information. Gstat -h will tell you that. Look for “Page buffers”
>
>
>
>
>
> *From:* firebird-support@yahoogroups.com <firebird-support@yahoogroups.com>
>
> *Sent:* 18. maj 2018 16:12
> *To:* firebird-support@yahoogroups.com
> *Subject:* [firebird-support] Firebird using all available memory
>
>
>
>
>
> Hi,
>
>
>
> I have a Debian 9 Linux server with 8GB of memory, a database with 30GB,
> page size 4KB, and Firebird 3.0.3 running in superserver mode and about
> 150-200 concurrent connections.
>
>
>
> In my firebird.conf I have changed the following properties:
>
>
>
> DefaultDbCachePages = 524288 # 2GB
>
> TempCacheLimit = 1024M # 1GB
>
> LockMemSize = 2M
>
>
>
> As superserver uses a shared cache, I presumed the total used memory
> should stay between 3GB and 4GB, but it keeps growing during the day until
> it reaches the 8GB limit and Firebird shuts down with this message:
>
>
>
> debian  Fri May 18 10:45:35 2018
> Shutting down the server with 150 active connection(s) to 2
> database(s), 0 active service(s)
>
>
>
> I am checking the active transactions during the day, and altought there
> are some old (2h to 3h) active transactions, I don't that an old active
> transaction should cause this, but I am reporting anyway, maybe it is
> relevant.
>
>
>
> Do someone have some advice to what should I do to prevent this from
> happening?
>
>
>
> Maybe my understanding about how Firebird uses memory is incorrect, so any
> advice about how I should calculate the required amount of memory needed is
> welcome.
>
>
>
> PS: I have migrated from FB 2.5 recently (previously I did use
> superclassic mode), and these problems started after the migration.
>
>
>
> Regards,
>
>
>
> Fabiano
>
> Vi gør opmærksom på, at denne e-mail kan indeholde fortrolig information.
> Hvis du ved en fejltagelse modtager e-mailen, beder vi dig venligst
> informere afsender om fejlen ved at bruge svarfunktionen. Samtidig beder vi
> dig slette e-mailen i dit system uden at videresende eller kopiere den.
> Selvom e-mailen og ethvert vedhæftet bilag efter vores overbevisning er fri
> for virus og andre fejl, som kan påvirke computeren eller it-systemet,
> hvori den modtages og læses, åbnes den på modtagerens eget ansvar. Vi
> påtager os ikke noget ansvar for tab og skade, som er opstået i forbindelse
> med at modtage og bruge e-mailen.
>
> Please note that this message may contain confidential information. If you
> have received this message by mistake, please inform the sender of the
> mistake by sending a reply, then delete the message from your system
> without making, distributing or retaining any copies of it. Although we
> believe that the message and any attachments are free from viruses and
> other errors that might affect the computer or it-system where it is
> received and read, the recipient opens the message at his or her own risk..
> We assume no responsibility for any loss or damage arising from the receipt
> or use of this message.
>
> 
>


[firebird-support] Firebird using all available memory

2018-05-18 Thread Fabiano Bonin fabiano.bo...@personalsoft.com.br [firebird-support]
Hi,

I have a Debian 9 Linux server with 8GB of memory, a database with 30GB,
page size 4KB, and Firebird 3.0.3 running in superserver mode and about
150-200 concurrent connections.

In my firebird.conf I have changed the following properties:

DefaultDbCachePages = 524288 # 2GB
TempCacheLimit = 1024M # 1GB
LockMemSize = 2M

As superserver uses a shared cache, I presumed the total used memory should
stay between 3GB and 4GB, but it keeps growing during the day until it
reaches the 8GB limit and Firebird shuts down with this message:

debian  Fri May 18 10:45:35 2018
Shutting down the server with 150 active connection(s) to 2
database(s), 0 active service(s)

I am checking the active transactions during the day, and altought there
are some old (2h to 3h) active transactions, I don't that an old active
transaction should cause this, but I am reporting anyway, maybe it is
relevant.

Do someone have some advice to what should I do to prevent this from
happening?

Maybe my understanding about how Firebird uses memory is incorrect, so any
advice about how I should calculate the required amount of memory needed is
welcome.

PS: I have migrated from FB 2.5 recently (previously I did use superclassic
mode), and these problems started after the migration.

Regards,

Fabiano


Re: [firebird-support] Is it save to append some data at end of the binary firebird database file?

2015-12-04 Thread Fabiano Kureck fabi...@sci10.com.br [firebird-support]

What you can do is inspect Firebird structure and search for an unused area.
Documentation about this can be found at
http://www.firebirdsql.org/manual/fb-internals.html

By example if you check
http://www.firebirdsql.org/manual/fbint-standard-header.html

Pag_checksum: Two bytes, unsigned. Bytes 0x02 - 0x03. Checksum for the 
whole page. No longer used, always 12345, 0x3039. Databases using ODS8 
on Windows NT do have a valid checksum here.


You can use this safely (?)

Em 03/12/2015 22:19, Christian Gütter n...@guetter.org 
[firebird-support] escreveu:



Mark Rotteveel wrote:

> On Windows, all files can have alternative streams with additional
> data. It is a form of hidden metadata that is attached to the main 
filename.


True, but the alternate data streams get lost when the file is stored
on a non-NTFS drive, sent via FTP/E-Mail etc. So depending on how the
software of the OP is released, this might not work well.

Anyway, rereading the original post, I realized that he is looking for
a platform independent solution, so my focus on Windows did not help
anyway.

Cheers,
Christian




--


Re: [firebird-support] Upgrade from 2.5.2 to 2.5.4

2015-11-06 Thread Fabiano Kureck fabi...@sci10.com.br [firebird-support]

No.
Only from 2.5.1 to another version.

Em 05/11/2015 22:21, todd.brass...@yahoo.com [firebird-support] escreveu:


Is a Backup and Restore Required?







Re: [firebird-support] Cannot Create Index

2015-10-13 Thread Fabiano Kureck fabi...@sci10.com.br [firebird-support]
Maximum key size is one quarter of page size. What is your database page 
size? What is the collation of that field?

Try increase database page size to 16Kb

Em 13/10/2015 12:20, Vishal Tiwari vishuals...@yahoo.co.in 
[firebird-support] escreveu:

Hi All,

I am trying to create index on a field which is of data type 
Varchar(255) using FlameRobin, while committing I get below error message:


key size exceeds implementation restriction for index "IDX_"


How do I create an index on a field which is of data type Varchar(255) ?

Thanks In Advance.

With Best Regards.

Vishal





[firebird-support] Firebird

2015-07-24 Thread Fabiano Kureck - Desenvolvimento SCI fabi...@sci10.com.br [firebird-support]
Você é Brasileiro? Estou acompanhando uma mensagem sua no grupo. Se 
falar português posso te ajudar melhor, por email, por aqui.

--


Re: [firebird-support] Problem with FB database that freezes

2015-07-24 Thread Fabiano Kureck - Desenvolvimento SCI fabi...@sci10.com.br [firebird-support]
Take at look at the HDD usage. Is HDD been used around 100% when slowly 
appears?


On 24/07/2015 16:00, conver...@gmail.com [firebird-support] wrote:


Thanks Thomas. Today we had a performance problem about 3 hours ago, 
we had to reboot the Windows server to solve it. Prior to the restart, 
the OAT-NT gap was 120479. After the restart it was 33.



Interestingly enough, currently the gap is 354354 as I write this. 
That's almost three times the gap we had at the time of the restart, 
and performance has been normal since we restarted.



Thanks everyone for the help, any other pointers are much welcomed.


Best Regards,


-Eduardo






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

2015-06-11 Thread Fabiano Kureck - Desenvolvimento SCI fabi...@sci10.com.br [firebird-support]
IMHO you have a corrupted database. You must use gfix to correct it 
(google it) and then your backup/restore cycle will be completed with no 
errors.


On 11/06/2015 17:33, Jack Mason jackma...@mindspring.com 
[firebird-support] wrote:


Why is everyone else not having this problem?  The databases are 
Firebird databases.  For 15 years we had no corruption from Interbase 
6.  Two years ago, we backed up our databases with Interbase 6 gbak 
and then used Firebird 2.52 to restore them.


Firebird 2.52 will back them up, but will not restore them without 
getting the trigger (3) error.  Since we have 5 databases, each 
built by Firebird two years ago from Interbase 6 backups and backed up 
for two years by Firebird 2.52 gbak, and totally different programs 
accessing the databases, it appears the corruption is/has been caused 
by Firebird.


Yet, no one else has seen this problem?

Jack









On 6/11/2015 3:08 PM, liviusliv...@poczta.onet.pl [firebird-support] 
wrote:


Hi,
you tried “also” 3.0 or only 3.0?
If only then try 2.5.5 snapshot
but error is about c++ configuration
http://answers.microsoft.com/en-us/windows/forum/windows_7-pictures/error-the-application-has-failed-to-start-because/df019c0d-746e-42d0-ad68-465e18e3f3ef
but first try different think.
Extract all files to different folder then your Firebird installation 
not only gbak.exe.
Try to run gbak from there. – i suppose that icu or something else is 
different if you only copy gbak.exe

regards,
Karol Bieniaszewski
*From:* mailto:firebird-support@yahoogroups.com
*Sent:* Thursday, June 11, 2015 8:03 PM
*To:* firebird-support@yahoogroups.com 
mailto:firebird-support@yahoogroups.com
*Subject:* Re: Odp: [firebird-support] Firebird 2.52 gbak fails to do 
a restore - error trigger (3)


Got it.  Here is what I got when I tried to execute it:

C:\backups\Bufordgbak -b -v -user SYSDBA -pas masterkey 
192.168.1.252:/bfl/smtb

db/customer customer.bak
The application has failed to start because its side-by-side 
configuration is in
correct. Please see the application event log or use the command-line 
sxstrace.e

xe tool for more detail.

What am I missing?

I tried for 3.0, but it would not even run... likely because it needs 
the 3.0 server running.


Jack

On 6/11/2015 12:09 PM, liviuslivius liviusliv...@poczta.onet.pl 
[firebird-support] wrote:

Hi,
no i mean go to
http://www.firebirdsql.org/en/snapshot-builds/
download e.g. Windows build
Firebird-2.5.5.26887
unzip it and get gbak.exe
and do backup and restore with it
regards,
Karol Bieniaszewski

Could not find gback file, but attached is a snapshot of the bin
directory for our download. Is that what you needed?

Jack

On 6/11/2015 11:35 AM, 'liviusliv...@poczta.onet.pl'
liviusliv...@poczta.onet.pl [firebird-support] wrote:

 Hi,

 Maybe another wrong direction,
 But download snapshot build of FB2.5
 And extract from there gback file. Do backup with them and try
to restore

 Regards,
 Karol Bieniaszewski



--
Our Constitution was made only for a moral and religious people. It 
is wholly inadequate to the government of any other. -- John Adams, 
Oct. 11, 1798 Where there is no vision, the people perish.. Prov 29:18


--
Our Constitution was made only for a moral and religious people. It 
is wholly inadequate to the government of any other. -- John Adams, 
Oct. 11, 1798 Where there is no vision, the people perish.. Prov 29:18






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

2015-06-03 Thread Fabiano Kureck - Desenvolvimento SCI fabi...@sci10.com.br [firebird-support]
Do you HAVE a memory problem? Or are you upset about Firebird using this 
amount of RAM?


On 03/06/2015 09:48, 'Jojakim Stahl' joja.li...@jojakim.de 
[firebird-support] wrote:


Hello,
still no solution. Running since last Friday, fbserver.exe grew up to 
+3GB memory so far. Few minutes ago, I stopped all our services, it 
remained only one attachment from isql to select mon$memory_usage: 
memory did not went down. IMHO, this memory leak is not caused by a 
client leaving open something, otherwise the memory should go down 
when the connection is closed, shouldn't it?


SQL select cast('NOW' as timestamp) TS, m.*, (select count(*) from 
mon$attachme
nts) ATTACHMENTS, (select count(*) from mon$statements) STATEMENTS 
from mon$memo

ry_usage m where m.mon$stat_group=0;

TS 2015-06-03 14:04:02.3910
MON$STAT_ID 1
MON$STAT_GROUP 0
MON$MEMORY_USED 3329950624
MON$MEMORY_ALLOCATED 3870920704
MON$MAX_MEMORY_USED 3331189248
MON$MAX_MEMORY_ALLOCATED 3870990336
ATTACHMENTS 1
STATEMENTS 1

Any hints how to investigate this problem?
Thank you.

--
joja

Von: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com]

Gesendet: Freitag, 29. Mai 2015 12:03
An: firebird-support@yahoogroups.com
Betreff: AW: [firebird-support] Re: Memory usage excess / leak in 
FBServer 2.5.4


 ---In firebird-support@yahoogroups.com, joja.lists@... wrote :

 I'm facing a problem where the firebird server v2.5.4 on win 2012 
server in superserver mode is leaking  memory. Currently I'm at ~5GB 
usage.


I just restarted our services: FB memory usage went down to normal values:
MON$STAT_ID 1
MON$STAT_GROUP 0
MON$MEMORY_USED 145842736
MON$MEMORY_ALLOCATED 152465408
MON$MAX_MEMORY_USED 147606936
MON$MAX_MEMORY_ALLOCATED 154570752

1. Show us results of
select count(*) form mon$attachments

Before restart: 11
After restart: 11

select count(*) form mon$transactions

Before restart: 0
After restart: 3

select count(*) form mon$statements

Before restart: 84
After restart: 122

2. Do you use any custom UDF's ?

No

--
Joja






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

2015-05-05 Thread Fabiano Kureck - Desenvolvimento SCI fabi...@sci10.com.br [firebird-support]

Did you run a Sweep before backup?

On 05/05/2015 08:02, Nick Upson n...@telensa.com [firebird-support] wrote:

yes, large transaction gap was the first thing I checked

Nick Upson, Telensa Ltd, Senior Operations Network Engineer
direct +44 (0) 1799 533252, support hotline +44 (0) 1799 399200

On 5 May 2015 at 12:01, Mark Rotteveel m...@lawinegevaar.nl 
mailto:m...@lawinegevaar.nl [firebird-support] 
firebird-support@yahoogroups.com 
mailto:firebird-support@yahoogroups.com wrote:


On 5-5-2015 12:15, Nick Upson n...@telensa.com
mailto:n...@telensa.com [firebird-support] wrote:
 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 4 hr 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

Have you checked for the existence of long running transactions (a
high
transaction gap)?

Mark
-- 
Mark Rotteveel








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

2015-05-05 Thread Fabiano Kureck - Desenvolvimento SCI fabi...@sci10.com.br [firebird-support]

In my experience, GC collected by the gbak is different from sweep.
I also have a problem with only my big customer (35Gb database) when the 
system become slow and slow over time. The solution was do a gbak with 
Garbage collect and then a sweep after.


First time you do this it will take probably a couple of hours. Sweep 
moves the transaction counter, gbak no (at least no in every situation). 
For testing purpose you can run a sweep now and the backup will take a 
lot less time this night. Give a try.





On 05/05/2015 08:12, Nick Upson n...@telensa.com [firebird-support] wrote:


On 5 May 2015 at 12:09, Fabiano Kureck - Desenvolvimento SCI 
fabi...@sci10.com.br mailto:fabi...@sci10.com.br [firebird-support] 
firebird-support@yahoogroups.com 
mailto:firebird-support@yahoogroups.com wrote:


Did you run a Sweep before backup?


​no but then the backup does gc, I'm interested in why the suggestion, 
I can try it​



Nick Upson, Telensa Ltd, Senior Operations Network Engineer
direct +44 (0) 1799 533252, support hotline +44 (0) 1799 399200





Re: [firebird-support] Query to slow

2015-02-18 Thread Fabiano Kureck - Desenvolvimento SCI fabi...@sci10.com.br [firebird-support]

select in does not use indexes. Use EXISTS() instead.

On 18/02/2015 11:25, martin_gorr...@yahoo.es [firebird-support] wrote:


Hi;

I am using FB 2.5.3. in a fast environment (win8 64bit - QuadCore 3.4 
Ghz - 8 GB ram).


If I run this query it goes very very fast and returns 84 records:

Preparing query: select distinct PROC from GEST where
(GEST.FSAL between '20080801' and '20080812') order by PROC
Prepare time: 0.007s
Field #01: GEST.PROC Alias:PROC Type:STRING(10)
PLAN SORT ((GEST NATURAL))


But if I run this one, it will return 84 records but it needs 10 
minutes !!!:


Preparing query: select PROC.PROC from PROC where (PROC.PROC 
in (select distinct PROC from GEST where (GEST.FSAL between 
'20080801' and '20080812'))) order by PROC

Prepare time: 0.003s
Field #01: PROC.PROC Alias:PROC Type:STRING(10)
PLAN SORT ((GEST NATURAL))
PLAN (PROC ORDER PROC_PK)

Executing...
Done.
-1258819480 fetches, 0 marks, 28351438 reads, 0 writes.
0 inserts, 0 updates, 0 deletes, 11439 index, 962254304 seq.
Delta memory: 25308 bytes.
Total execution time: 0:10:53 (hh:mm:ss)
Script execution finished.

PROC is a table with 11400 rows. Even if the query optimizer takes the 
worse path (analizing one by one) it seems that 10 minutes es to much 
... In my opinion, both may run very quick. Why is the second one 
taking that long?.


Thank you!





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

2015-01-21 Thread Fabiano Kureck - Desenvolvimento SCI fabi...@sci10.com.br [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).
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?



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.

Yes, this is the trick.



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.


Sorry, is in my developer machine. W7, 4Gb RAM, 1 SATA HDD (it is very 
slow IMPOV), FB 2.5.1, nothing special.




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.





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

2015-01-21 Thread Fabiano Kureck - Desenvolvimento SCI fabi...@sci10.com.br [firebird-support]
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 also tested this and if you run various threads inserting among 
different tables there are no performance issues.
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. With this 
approach I can insert around 11,000 recods/second! (if there are no 
Indexes, even PK).


This is the SP's body:

SET TERM ^ ;

create or alter procedure SP_INSERTS (
TABELA varchar(50),
CAMPOS varchar(1024),
VALORES varchar(32750))
as
declare variable WSTART integer;
declare variable WCMD varchar(32750);
declare variable WPOS integer;
declare variable WSTR varchar(32750);
begin
  wStart = 1;
  while (1=1) do
  begin
wPOS = POSITION(' # ', valores, wStart);
if (wPOS = 0) then
  break;

wSTR = substring(valores from wStart for wPOS - wStart);
wStart = wPOS + 3;

wCmd = 'insert into ' || tabela || campos || ' values ' || wSTR;
execute statement wCmd;
  end
end^

SET TERM ; ^

How to use:
execute procedure SP_INSERTS('MY_TABLE', '(id, name, foo)', '(1, 'A', 
'AA') # (2, 'B', 'BB') # (3, 'C', 'CC')');


Also, there are some limitations with this technique. The entire command 
does not exceed 64Kb, so you must trim the string and split between more 
commands.


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

On 21/01/2015 07:47, brucedickin...@wp.pl [firebird-support] wrote:


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 trans action 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 conn ection. 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, p erformance 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.







Re: [firebird-support] FB 2.5.3 32bit and Db size limits test

2014-12-11 Thread Fabiano Kureck - Desenvolvimento SCI fabi...@sci10.com.br [firebird-support]
I have a database of 70Gb, more than 70% images, maybe you have a 
problem in your system as said before.


On 11/12/2014 09:56, Daniel Rail dan...@accra.ca [firebird-support] wrote:


Hi,


What version of Firebird(Classic, SuperClassic, SuperServer or Embedded)?


What is the page cache/buffers(run GSTAT -H on the database)?


Is it your application that is returning the our of memory error? 
 Because for a 32-bit application, there is a 2GB memory limit, and if 
all those 13,000 images are loaded in memory within your application, 
that is most likely the problem.  And, a 64-bit application doesn't 
have that limitation.  Also, NTFS is a 64-bit filesystem(even for 
32-bit applications), so the 2GB limit doesn't exist, it's above the 
TeraByte for a single file(but still depends on the size limit of the 
drive).



Also, we do have customers that have databases that are over 20GB, 
with approximately 75% of the data being images.  And, that was with 
Firebird 1.5 32-bit on NTFS, now they are all on Firebird 2.5.3 64-bit.




--

Best regards,

 Daniel Rail

 Senior Software Developer

 ACCRA Solutions Inc. (www.accra.ca http://www.accra.ca)

 ACCRA Med Software Inc. (www.filopto.com http://www.filopto.com)


At December 11, 2014, 3:58 AM, af_12...@yahoo.com 
mailto:af_12...@yahoo.com [firebird-support] wrote:









on Win764 bit , it's a NTFS

anyway i have to use FB 64 bit to get more then  2gb DB














Re: [firebird-support] Stability on newer windows ...

2014-11-19 Thread Fabiano Kureck - Desenvolvimento SCI fabi...@sci10.com.br [firebird-support]
Currently, FB 2.1 is lo longer supported as older OSs. Maybe your 
problem was corrected in a newer FB version as FB 2.5.3 (that corrects a 
bug of caching on 64 bit Windows by example).

IMHO, you need to switch to the lasted Firebird (2.5.3) and try again.

On 19/11/2014 13:10, Lester Caine les...@lsces.co.uk [firebird-support] 
wrote:


My systems have run for many years on XP and W2k without any problems,
but now I'm being forced to upgrade systems on sites to a later version
of windows, I'm hitting problems. I'm having to live with both Windows 7
and 8.1, fortunately 8 is black listed like vista. I've had problems
with windows update and still have two machines which are 'stuck' at an
old update, but reason for message ...

One of my customers has FB2.1 running on W7 which was upgraded last year
and has a clean firebird log up until 10th November when it started to
grow hourly ...

Various errors including
gds__detach: Unsuccessful detach from database
10053, 10054 and 10061

Machine has been rebooted, databases backed up and restored, apart from
an update for IE10 which will not install everything is up to date.

ANY ideas ... bearing in mind I have to get their IT department to do
anything security wise.

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk






Re: [firebird-support] Stability on newer windows ...

2014-11-19 Thread Fabiano Kureck - Desenvolvimento SCI fabi...@sci10.com.br [firebird-support]

Try using the 32 bit version of Firebird, maybe this can help you.

On 19/11/2014 14:11, Lester Caine les...@lsces.co.uk [firebird-support] 
wrote:


On 19/11/14 17:15, Fabiano Kureck - Desenvolvimento SCI
fabi...@sci10.com.br [firebird-support] wrote:

 Currently, FB 2.1 is lo longer supported as older OSs. Maybe your
 problem was corrected in a newer FB version as FB 2.5.3 (that corrects a
 bug of caching on 64 bit Windows by example).
 IMHO, you need to switch to the lasted Firebird (2.5.3) and try again.

Should have added that I am now unable to recompile the code base for
the application software and that will not work with 2.5 :( It has been
working fine for a year now and it's only the last few days that this
problem has arisen. The ONLY change is pigging 'windows update' and I've
finally had an OK to disable them since the machines have no internet
access anyway and even IE10 is not needed on the machines.

 My systems have run for many years on XP and W2k without any problems,
 but now I'm being forced to upgrade systems on sites to a later version
 of windows, I'm hitting problems. I'm having to live with both 
Windows 7

 and 8.1, fortunately 8 is black listed like vista. I've had problems
 with windows update and still have two machines which are 'stuck' at an
 old update, but reason for message ...

 One of my customers has FB2.1 running on W7 which was upgraded last 
year

 and has a clean firebird log up until 10th November when it started to
 grow hourly ...

 Various errors including
 gds__detach: Unsuccessful detach from database
 10053, 10054 and 10061

 Machine has been rebooted, databases backed up and restored, apart from
 an update for IE10 which will not install everything is up to date.

 ANY ideas ... bearing in mind I have to get their IT department to do
 anything security wise.

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk






RES: [firebird-support] Migration from Firebird 32 1.5.6 to Firebird 64 2.5.3

2014-10-29 Thread 'Fabiano - Desenvolvimento SCI' fabi...@sci10.com.br [firebird-support]
It is a good idea to backup and restore the database to recreate them with the 
new OSD.

This will improve performance and MAYBE this can solve your problem.

 

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] 
Enviada em: quarta-feira, 29 de outubro de 2014 11:05
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] Migration from Firebird 32 1.5.6 to Firebird 64 
2.5.3

 

  

Hi. 
I want to replace my Firebird 32 1.5.6 with the last  Firebird 64 2.5.3, on 64b

All my databases was created with 32b, 1.5.6 Firebird.

After installed Firebird 64, if a try to connect to database.FDB a received an 
error

database.fdb is not a valid database.

Solutions?
Thanks.

 





RES: [firebird-support] Firebird Embedded corruptions

2014-09-19 Thread 'Fabiano - Desenvolvimento SCI' fabi...@sci10.com.br [firebird-support]
Ann, about the third problem: 

“The third problem is two records in a referencing table lack mates in the 
referenced table, despite a referential constraint.  I have no idea how that 
happened, but it should be reasonably easy to fix in your database.

”

I saw this happen two times, it is related to bad RAM. I thought that when 
Firebird writes to the memory the memory changes this contents and when the 
transaction commits you get a different value. We struggle with one case this 
week. The solution is change RAM from the server where Firebird is running.

 

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] 
Enviada em: sexta-feira, 19 de setembro de 2014 16:14
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] Firebird Embedded corruptions

 

  

On Mon, Sep 15, 2014 at 7:41 AM, Jan Flyborg jan.pers...@gmail.com 
[firebird-support] firebird-support@yahoogroups.com wrote:

 

 

 

I just made another posting where I tried to describe three different examples 
of things we have seen.

 

The first was a wrong page type, which sounds like a bug that was fixed in a 
newer version in code that's common to all Firebird architectures.  In your 
case, the bad page was in an index (7).  If you can find the index with the bad 
page and recreate it, all will be well.

 

Just as an FYI, the page types are:

 0 -   undefined, normally an uninitialized page and indicates a bad 
page pointer elsewhere;

 1 -  Database header page

 2 - Page inventory page

 3 - Transaction inventory page

 4 - Pointer page

 5 - Data page

 6 - Index root page - contains information about each index on the table, 
one per table

 7 - Index (B-tree) page

 8 - Blob data page

 9 -   Generator pages

 

The second problem (CCH_precedence: block marked.  file: cch.cpp line: 4390) is 
more concerning - I don't remember having read a bug about it.  CCH is the 
cache handler.  A mark is the sign that a page is about to be changed.   When 
Firebird is forced to write a page either as part of a commit or to free space 
in the cache, it must write out any pages that the page depends on first.  
That's a little obscure.  Suppose that the page you're about to write has a 
record with a back version, and the back version is on a different page.  To 
keep the database consistent, the page with the back version must be on disk 
before the page that includes a record that points to the back version.  
Firebird keeps a list of precedence relationships and CCH goes through them 
before writing a page.  I think the error means that someone is currently 
writing  to a page that's on the precedence list.  That should never happen.  
It's interesting that the problem occurred during an alter index operation.  
However, the database should be fine on disk and usable after you restart 
Firebird.  Page marks are entirely in memory.  It's quite possible that I 
missed a bug report and this problem was fixed in a later version.

 

The third problem is two records in a referencing table lack mates in the 
referenced table, despite a referential constraint.  I have no idea how that 
happened, but it should be reasonably easy to fix in your database.

 

The first problem is what I would call a physical  corruption - the internal 
structure of the database is corrupt.  The second is an in-memory   corruption 
- the disk database is OK, but the in-memory version is damaged.  The third is 
logical corruption - the database is physically intact, but does not conform to 
the data rules..   

 

 

Typically we fix our problems with a gfix -mend and then doing a backup restore 
cycle. Usually some tables then still have problems (typically foreign keys 
that refers to non existing primary keys), so if possible we then remove the 
faulty records and then it works again.

 

Gfix is pretty old and somewhat crude.  IBFirstAid might give you better help 
on physical corruptions.  Checking that there is no non-conforming data before 
creating constraints may help with logical corruption.  

 

Good luck (and my apologies for the late response)

 

Ann





RES: [firebird-support] Case insensitive search on a memo field

2014-09-05 Thread 'Fabiano - Desenvolvimento SCI' fabi...@sci10.com.br [firebird-support]
You can create a computed index for this:

CREATE INDEX idxname ON mytable COMPUTED BY (lowercase(mymemo))

 

Hope this help you.

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Enviada em: sexta-feira, 5 de setembro de 2014 08:51
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] Case insensitive search on a memo field

 

  

Hi,

 

I'm using Firebird 2.5.3, and I am looking for text in a emo field, eg.

 

Select * from mytable t where t.mymemo like '%find me%'

 

The will only find

 

find me

 

and not

 

FIND ME or

Find me or

Find Me etc

 

 

I'm tempted to do something like

 

Select * from mytable t where lowercase(t.mymemo) like '%find me%'

 

but since this memo field could be enormous, I'm guessing that wold be
horribly inefficient.

 

Is there a better way?

 

Thanks

Maya

 





RES: [firebird-support] object is in use

2014-08-18 Thread 'Fabiano - Desenvolvimento SCI' fabi...@sci10.com.br [firebird-support]
Maybe this can help:

SELECT st.mon$statement_id as Statement ID,

   st.mon$attachment_id as Attachment ID,

   st.mon$transaction_id Transaction ID,

   case

 when st.mon$state = 0 then 'IDLE'

 when st.mon$state = 1 then 'ACTIVE'

   end as State,

   st.mon$timestamp Started At,

   st.mon$sql_text Statement Text,

   r.mon$record_seq_reads as Non-indexed Reads,

   r.mon$record_idx_reads as Indexed Reads,

   r.mon$record_inserts as Records Inserted,

   r.mon$record_updates as Records Updated,

   r.mon$record_deletes as Records Deleted,

   r.mon$record_backouts as Records Backed Out,

   r.mon$record_purges as Records Purged,

   r.mon$record_expunges as Records Expunged,

   io.mon$page_reads as Page Reads,

   io.mon$page_writes as Page Writes,

   io.mon$page_fetches as Page Fetches,

   io.mon$page_marks as Page Marks

FROM mon$statements st

left join mon$record_stats r on (st.mon$stat_id = r.mon$stat_id)

left join mon$io_stats io on (st.mon$stat_id = io.mon$stat_id)

where st.mon$state=1

order by st.mon$timestamp

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Enviada em: segunda-feira, 18 de agosto de 2014 14:48
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] object is in use

 

  

Hello.

IBExpert shows the message:

lock conflict on no wait transaction
unsuccessful metada update
object MY_PROCEDURE is in use

How can I see 'who' is using the procedure?

-- 

Atenciosamente,

Hugo Eyng





RES: [firebird-support] object is in use

2014-08-18 Thread 'Fabiano - Desenvolvimento SCI' fabi...@sci10.com.br [firebird-support]
FB 

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Enviada em: segunda-feira, 18 de agosto de 2014 16:47
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] object is in use

 

  

Hello Carlos.

Thanks.

I am using IBExpert to run an 'CREATE OR ALTER PROCEDURE MY_PROCEDURE.

That´s why I am not understending what can avoid to execute this.

This PROCEDURE just returns a value from a table.

I should be able to drop and insert a PROCEDURE at anytime into the DB.
Should not I?




Em 18/08/2014 16:40, 'Carlos H. Cantu' lis...@warmboot.com.br
[firebird-support] escreveu:

  

When you start a transaction you determine the wait mode. Where you set this
depends on the component/access technology you are using.

Carlos
Firebird Performance in Detail -  http://videos.firebirddevelopersday.com
http://videos.firebirddevelopersday.com
 http://www.firebirdnews.org www.firebirdnews.org -
http://www.FireBase.com.br www.FireBase.com.br








Hi Carlos.

Where do I chage it?

Hugo

Em 18/08/2014 15:06, 'Carlos H. Cantu'  mailto:lis...@warmboot.com.br
lis...@warmboot.com.br [firebird-support] escreveu:
 
To avoid such error, try to change the DDL transaction parameter to
WAIT instead of NO WAIT.

Carlos
Firebird Performance in Detail -  http://videos.firebirddevelopersday.com
http://videos.firebirddevelopersday.com
 http://www.firebirdnews.org www.firebirdnews.org -
http://www.FireBase.com.br www.FireBase.com.br

HEhmcfs Hello.

HEhmcfs IBExpert shows the message:

HEhmcfs lock conflict on no wait transaction
HEhmcfs unsuccessful metada update
HEhmcfs object MY_PROCEDURE is in use

HEhmcfs How can I see 'who' is using the procedure?


-- 


Atenciosamente,

Hugo Eyng







-- 
 
 
Atenciosamente,
 
Hugo Eyng





RES: [firebird-support] object is in use

2014-08-18 Thread 'Fabiano - Desenvolvimento SCI' fabi...@sci10.com.br [firebird-support]
Also, FB 2.5.0 has problems with this. If you use this version upgrade to
2.5.1 or above.

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Enviada em: segunda-feira, 18 de agosto de 2014 16:47
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] object is in use

 

  

Hello Carlos.

Thanks.

I am using IBExpert to run an 'CREATE OR ALTER PROCEDURE MY_PROCEDURE.

That´s why I am not understending what can avoid to execute this.

This PROCEDURE just returns a value from a table.

I should be able to drop and insert a PROCEDURE at anytime into the DB.
Should not I?




Em 18/08/2014 16:40, 'Carlos H. Cantu' lis...@warmboot.com.br
[firebird-support] escreveu:

  

When you start a transaction you determine the wait mode. Where you set this
depends on the component/access technology you are using.

Carlos
Firebird Performance in Detail -  http://videos.firebirddevelopersday.com
http://videos.firebirddevelopersday.com
 http://www.firebirdnews.org www.firebirdnews.org -
http://www.FireBase.com.br www.FireBase.com.br








Hi Carlos.

Where do I chage it?

Hugo

Em 18/08/2014 15:06, 'Carlos H. Cantu'  mailto:lis...@warmboot.com.br
lis...@warmboot.com.br [firebird-support] escreveu:
 
To avoid such error, try to change the DDL transaction parameter to
WAIT instead of NO WAIT.

Carlos
Firebird Performance in Detail -  http://videos.firebirddevelopersday.com
http://videos.firebirddevelopersday.com
 http://www.firebirdnews.org www.firebirdnews.org -
http://www.FireBase.com.br www.FireBase.com.br

HEhmcfs Hello.

HEhmcfs IBExpert shows the message:

HEhmcfs lock conflict on no wait transaction
HEhmcfs unsuccessful metada update
HEhmcfs object MY_PROCEDURE is in use

HEhmcfs How can I see 'who' is using the procedure?


-- 


Atenciosamente,

Hugo Eyng







-- 
 
 
Atenciosamente,
 
Hugo Eyng





RES: [firebird-support] Firebird 1.5 on 64bit OS. Newer Hardware but bad performance

2014-05-30 Thread 'Fabiano - Desenvolvimento SCI' fabi...@sci10.com.br [firebird-support]
Maybe you dont have a HDD cached controller.

Run a program like Crystal Disk Mark in the old computer and in the new 
computer. If the performance of new computer is terrible you must change your 
physical hard disk controller. 

I had this problem with a Dell server that is a “internet server” (without 
cache) instead of a “Database serve”.

 

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] 
Enviada em: quinta-feira, 29 de maio de 2014 21:42
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] Firebird 1.5 on 64bit OS. Newer Hardware but bad 
performance

 

  

We recently upgraded our database server from Win server 2003 to Win 2008 
server. We upgraded hardware as well.

The new hardware (IBM x3550 M4) is way more advanced than the old one. 4 times 
the RAM and CPU speed.

We ran some tests on the new hardware(a few select/update queries), the 
performance was way less than the old server using the same database.

I read somewhere on one of IB Surgeon slides that All architectures of 32 bit 
Firebird will work bad at 64-bit Windows with 4Gb RAM.

Since we can't upgrade our Firebird DB to 2.x, Do we need to downgrade our OS 
to a 32 bit version and install less RAM to gain a little more performance or 
we missing something else?

 

Thanks,

-Halim

 





RES: [firebird-support] Cache Performance Options

2014-05-13 Thread 'Fabiano - Desenvolvimento SCI' fabi...@sci10.com.br [firebird-support]
Large gap is not caused by lack of auto sweep. It is bad system design.

As you is not the system programmer, you can shut down all connections to the 
database during lunch time, then you can let users enter in your system again.

After shutting down, run a manual sweep (gfix –sweep). If you see a increase in 
performance, your system is bad transaction designed.

 

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] 
Enviada em: terça-feira, 13 de maio de 2014 11:31
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] Cache Performance Options

 

  

Set,

There is a large gap because I turned off auto sweeping. I disabled it because 
when it was sweeping, it was killing performance even more. Previous to the 
2.5.2 update, it was also using all the memory and causing the server to swap 
every time it did a sweep (20,000 transactions). Right now, I have it sweeping 
once during their lunch downtime and again at the end of the day. It is faster 
than before the 2.5.2 update, but still not fast.

 

-Josh

 

On Tue, May 13, 2014 at 12:18 AM, Svein Erling Tysvær 
svein.erling.tysv...@kreftregisteret.no [firebird-support] 
firebird-support@yahoogroups.com wrote:

  

I am a MSP for a large dental office that uses an application with a Firebird 
DB. I've done a lot of database work in my life, 
but none with firebird so I need a little help with the configurations. The 
office is complaining of slowness and what we've 
done so far to help them will be below. Keep in mind, I am not the developer 
of the application, just a MSP trying to help 
them out since the developer has no clue what they're doing. 
 
We noticed the server would start pretty fast but then throughout the day slow 
down. 
 
Thanks for any advice you can give. 

A slow database can have lots of reasons, Josh. I take it that the 'large 
dental office' is amongst the largest companies that use the application in 
question, either in terms of database size or number of simultaneous users? 
Your observation that things slow down gradually, indicates that one 
possibility is that the developer hasn't thought thoroughly enough about 
transactions (a vital part of Firebird). Try running gstat when the database is 
slow, maybe you will see a large gap between oldest and next transactions. 

HTH, 
Set 

 





RES: [firebird-support] Cache Performance Options

2014-05-13 Thread 'Fabiano - Desenvolvimento SCI' fabi...@sci10.com.br [firebird-support]
Josh, you have a system error.

No Firebird configuration can deal with that scenario.

The only solution is tell this to your system programmer. He will take a look 
and fix your system. The gap between transactions will be reduced and your 
system will run fast everything. 

Probably it will by a nightmare to your programmer… good look!

 

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] 
Enviada em: terça-feira, 13 de maio de 2014 11:42
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] Cache Performance Options

 

  

That is exactly what I'm doing right now. Its the only way to keep them going. 
I shut them down at lunch, run a sweep, then when they get back in, things are 
much faster.

 

-Josh

 

On Tue, May 13, 2014 at 8:35 AM, 'Fabiano - Desenvolvimento SCI' 
fabi...@sci10.com.br [firebird-support] firebird-support@yahoogroups.com 
wrote:

  

Large gap is not caused by lack of auto sweep. It is bad system design.

As you is not the system programmer, you can shut down all connections to the 
database during lunch time, then you can let users enter in your system again.

After shutting down, run a manual sweep (gfix –sweep). If you see a increase in 
performance, your system is bad transaction designed.

 

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] 
Enviada em: terça-feira, 13 de maio de 2014 11:31
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] Cache Performance Options

 

  

Set,

There is a large gap because I turned off auto sweeping. I disabled it because 
when it was sweeping, it was killing performance even more. Previous to the 
2.5.2 update, it was also using all the memory and causing the server to swap 
every time it did a sweep (20,000 transactions). Right now, I have it sweeping 
once during their lunch downtime and again at the end of the day. It is faster 
than before the 2.5.2 update, but still not fast.

 

-Josh

 

On Tue, May 13, 2014 at 12:18 AM, Svein Erling Tysvær 
svein.erling.tysv...@kreftregisteret.no [firebird-support] 
firebird-support@yahoogroups.com wrote:

  

I am a MSP for a large dental office that uses an application with a Firebird 
DB. I've done a lot of database work in my life, 
but none with firebird so I need a little help with the configurations. The 
office is complaining of slowness and what we've 
done so far to help them will be below. Keep in mind, I am not the developer 
of the application, just a MSP trying to help 
them out since the developer has no clue what they're doing. 
 
We noticed the server would start pretty fast but then throughout the day slow 
down. 
 
Thanks for any advice you can give. 

A slow database can have lots of reasons, Josh. I take it that the 'large 
dental office' is amongst the largest companies that use the application in 
question, either in terms of database size or number of simultaneous users? 
Your observation that things slow down gradually, indicates that one 
possibility is that the developer hasn't thought thoroughly enough about 
transactions (a vital part of Firebird). Try running gstat when the database is 
slow, maybe you will see a large gap between oldest and next transactions. 

HTH, 
Set 

 

 





RES: [firebird-support] Query optimization mystery

2014-05-13 Thread 'Fabiano - Desenvolvimento SCI' fabi...@sci10.com.br [firebird-support]
Your problem is: 

PLAN JOIN (SP NATURAL, A INDEX (ADVOCATE_))

Wish means a full table scan on SUPPROG. It is strange, because you have the 
index 

USV_SUPPROG_ADVOCATE_CODE ON field ADVOCATE_CODE

 

Try this:

select * from

(

  select a.User_ID
  from Advocate

  where a.USER_ID=37

) as FILTER1,  supprog sp

Where sp.ADVOCATE_CODE=FILTER1.Advocate_Code

 

Firebird will first filter the needed data and then join using the index 
USV_SUPPROG_ADVOCATE_CODE at table supprog. This, (at least for me) is always 
de faster way Firebird retrieve data. (Filter and/or order your data and then 
join with other tables)

 

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] 
Enviada em: terça-feira, 13 de maio de 2014 16:29
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] Query optimization mystery

 

  

I've got a query optimization mystery I need some help with. The short version 
is I've got two tables that are very similar, but when I join each of them to a 
third table, I get different plans - one runs fast and the other runs slow. 
Here are the queries:

select sp.STUDENTSEQ, a.User_ID
from schlhist sp
join Advocate a on sp.ADVOCATE_CODE=a.Advocate_Code
where a.USER_ID=37

select sp.STUDENTSEQ, a.User_ID
from supprog sp
join Advocate a on sp.ADVOCATE_CODE=a.Advocate_Code
where a.USER_ID=37

The first runs with plan PLAN JOIN (A INDEX (IDX_ADVOCATE1), SP INDEX 
(USV_SCHLHIST_ADVOCATE_CODE)) which is fast. The second runs with plan PLAN 
JOIN (SP NATURAL, A INDEX (ADVOCATE_)) which is slow. If I change the plan on 
the second to PLAN JOIN (A INDEX (IDX_ADVOCATE1), SP INDEX 
(USV_supprog_ADVOCATE_CODE)) it also runs fast. I don't really understand 
statistics but USV_SUPPROG_ADVOCATE_CODE
has 0.029412 and USV_SCHLHIST_ADVOCATE_CODE
has 0.000422. That seems like a potentially important difference, but I'm not 
sure what it means or what to do about it.

Here's the ddl (I've chopped out a lot fields I didn't think were relevant):

CREATE TABLE ADVOCATE(
ADVOCATE_CODE varchar(15),
ADVOCATE varchar(20) COLLATE EN_US,
TEACHINGCERT varchar(1) COLLATE EN_US,
GENDATE timestamp,
MODDATE timestamp,
CHANGESTATUSFLAG smallint,
REGIONCODE smallint,
RETIREDCODE varchar(1),
USER_ID integer
);

CREATE UNIQUE INDEX ADVOCATE_ ON ADVOCATE (ADVOCATE_CODE);
CREATE INDEX ADVOCATE_ADVOCATE ON ADVOCATE (ADVOCATE);
CREATE INDEX ADVOCATE_REGIONCODE ON ADVOCATE (REGIONCODE);
CREATE INDEX IDX_ADVOCATE1 ON ADVOCATE (USER_ID);

CREATE TABLE SCHLHIST(
STUDENTSEQ integer,
DOMID varchar(2) COLLATE EN_US,
DBID smallint,
SHSEQ integer,
FACILITYID varchar(6) COLLATE EN_US,
LQMDATE date,
RESDATE date,
FUNDINGDATE date,
ENROLLDATE date,
WITHDRAWDATE date,
GENDATE timestamp,
ADVOCATE_CODE varchar(15),
COMMENT blob sub_type 1
);

CREATE UNIQUE INDEX SCHLHIST_ ON SCHLHIST (STUDENTSEQ,DOMID,DBID,SHSEQ);
CREATE INDEX SCHLHIST_FACILITYIDINDEX ON SCHLHIST (FACILITYID);
CREATE INDEX SCHLHIST_MOSTRECENTINDEX ON SCHLHIST 
(STUDENTSEQ,RESDATE,FUNDINGDATE,GENDATE);
CREATE INDEX SCHLHIST_STUDENTSEQINDEX ON SCHLHIST (STUDENTSEQ);
CREATE INDEX SCHLHIST_STUFACINDEX ON SCHLHIST (STUDENTSEQ,FACILITYID);
CREATE INDEX USV_SCHLHIST_ADVOCATE_CODE ON SCHLHIST (ADVOCATE_CODE);

CREATE TABLE SUPPROG(
STUDENTSEQ integer,
DOMID varchar(2) COLLATE EN_US,
DBID smallint,
SHSEQ integer,
SPKEY varchar(15) COLLATE EN_US,
SPCODE varchar(3) COLLATE EN_US,
ADVOCATE_CODE varchar(15),
OWNER_USER_ID integer
);

CREATE UNIQUE INDEX SUPPROG_ ON SUPPROG (STUDENTSEQ,DOMID,DBID,SHSEQ,SPKEY);
CREATE INDEX USV_SUPPROG_ADVOCATE_CODE ON SUPPROG (ADVOCATE_CODE);
CREATE INDEX USV_SUPPROG_OWNER_USER_ID ON SUPPROG (OWNER_USER_ID); 





RES: [firebird-support] Query optimization mystery

2014-05-13 Thread 'Fabiano - Desenvolvimento SCI' fabi...@sci10.com.br [firebird-support]
Maybe.

Try update all index statistics. MAYBE it helps.

In last case MAYBE a backup/restore can help too… (or drop and recreate those 
indexes)

 

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] 
Enviada em: terça-feira, 13 de maio de 2014 17:15
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] Query optimization mystery

 

  

Try this:

select * from

(

  select a.User_ID
  from Advocate

  where a.USER_ID=37

) as FILTER1,  supprog sp

Where sp.ADVOCATE_CODE=FILTER1.Advocate_Code

 

 This doesn't quite execute.  I cleaned it up to this:

 

select * from (
select a.User_ID, a.ADVOCATE_CODE
from Advocate a
where a.USER_ID=37
) as FILTER1,supprog sp
Where sp.ADVOCATE_CODE=FILTER1.Advocate_Code

 

It gets the same plan: PLAN JOIN (SP NATURAL, FILTER1 A INDEX (ADVOCATE_)).  
But it has another problem, too:  ultimately I'm wanting to use this as part of 
a view, so I can't do my filtering inside the query.

 

Why isn't Firebird using the index?  Do the index statistics have anything to 
do with it?





RES: [firebird-support] Re: database gone after server reboot

2014-04-17 Thread Fabiano - Desenvolvimento SCI
It is only used in read only databases do decrease de size of a database for 
less space purpose.

Do not use this in a production database, the overall performance will drop.

 

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] 
Em nome de jakef...@yahoo.com
Enviada em: quinta-feira, 17 de abril de 2014 11:14
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] Re: database gone after server reboot

 

  

I'm not familiar with the RESERVE flag.  I don't think we've set it explicity.  
What is it function?  Does it affect this?: All pages will be filled to 100% 
and will be most useful on read-only databases. No space is reserved in each 
page for updates and/or deletions.





RES: [firebird-support] how debug a memory corruption exception

2014-03-12 Thread Fabiano - Desenvolvimento SCI
Try ran Windows 7 memory test (press F8 while booting). If it detects your 
memory is corrupted the only thing to do is replace your physical memory.

 

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] 
Em nome de korkl...@yahoo.it
Enviada em: quarta-feira, 12 de março de 2014 11:09
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] how debug a memory corruption exception

 

  

hi, i'm using the .net provider with the last embedded fb version on a x64 
windows 7 machine.
i have an application always active that abaout every minute will connect to 
the db, 1/2 times a day it crashes when it tries to open the connection, this 
is the relevant stack trace of the exception:
System.AccessViolationException: Attempted to read or write protected memory. 
This is often an indication that other memory is corrupt.
   at FB_1236665269_Class.isc_attach_database(IntPtr[] statusVector, Int16 
dbNameLength, Byte[] dbName, Int32 dbHandle, Int16 parmBufferLength, Byte[] 
parmBuffer)

i see in an old fb thread in the forum the suggestion to download the Debug Kit 
to give you same useful informations to find the bug that cause this kind of 
exception but the link with the description of how use the debug kit was broken.
now i'm using the debug kit files in my app so i want know what i must do the 
next time that my app will crash to s end you same info (i'm a .NET developer 
and i don't know how debug a native application)





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

2014-02-24 Thread Fabiano - Desenvolvimento SCI
The right thing to do to avoid this kind of corruption is make diary backups
and ensure you can restore them!

If you can't backup or not restore the entire database (including
reactivating all foreign keys) you must stop immediately and try to fix the
database.

 

I think you ran this database corrupted for a long time or without a
backup/restore for a long time.

Fabiano.

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Ann Harrison
Enviada em: segunda-feira, 24 de fevereiro de 2014 17:58
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] Wrong page type, how to examine/fix?

 

  

Kjell,
 
 
 
 On Feb 24, 2014, at 7:24 AM, Kjell Rilbe kjell.ri...@datadia.se
 
 database file appears corrupt
 (D:\DATADIA\DATA\FIREBIRD\BACKUP\DIAMONDS.FDB)
 -wrong page type
 -page 12301932 is of wrong type (expected 4, found 7)
 Alas, not a great situation. Page type 4 is a pointer page - an array
 of data page numbers that's one level of indirection in resolving
 record locations. Page type 7 is ani index page. Fortunately, pointer
 pages can be reconstructed from the rest of the database structure. I
 think that the free version of IBFirstAid will tell you which table is
 missing a pointer page. From there, the paid version should be able to
 fix the problem.
 
 If the errors are located in a specific index (or unique constraint),
 would it be a good idea to drop that index/constraint and try a regular
 gbak backup/restore cycle?

No, the indexes are fine in this case. If the error had been expected 7
encountered n then you might have been able to disable the index. But
there's a doubly allocated page and the second allocation was as an index -
before the page was released from the table. A pointer page doesn't contain
data - just the page numbers of data pages. It's essential to the structure
of the table and you can't drop the table with a missing pointer page.
 
 And if the errors are located in a table's data pages - drop the table
 and do gbak backup/restore?
 

 I did get an indication that it might be in a table I can recreate by
 other means...
 
 Tried to drop the entire table that I found has corruption, but as I 
 suspected it didn't work. Pity. :-) I also see there's no way to get 
 gbak to skip that table, which would probably have been useful. Or am I 
 wrong?
 

Back in the dark ages, I used to fix this sort of corruption by hand, but
IBSurgeon has tools that will (I believe with high confidence) fix it
automatically and in place. Logically, it's not very hard - just find the
unreferenced data pages, put them in an array in the right order, put that
array on an unused page, format the page as a pointer page and fix the
RDB$PAGES table. Actually, it's a royal pain without a good tool. Check with
Paul Beach at IBPhoenix for all the details. There's nothing you can do to
fix the database without tools. However, if your application doesn't use the
damaged table, you can keep running until you have time to fix the problem.

And no, there won't be a reproducible case. And yes, you should be prepared
to provide lots of details about version, environment, usage etc. The page
allocation algorithms take a huge beating and have for years - new bugs in
that area are rare and elusive. But, unfortunately, not beautiful - think
coelacanth, not unicorn.

Good luck,

Ann
 





RES: [firebird-support] For those who think they have performance problems

2014-02-21 Thread Fabiano - Desenvolvimento SCI
I belive!
We use 20011. 

When we raised to 20011 performance is much better and memory consume is a 
little bit more.

I think FB developers must increase a lot the default value, specially with 
upcoming FB 2.5.3

 

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] 
Em nome de Alexey Kovyazin
Enviada em: sexta-feira, 21 de fevereiro de 2014 07:38
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] For those who think they have performance 
problems

 

  

 

LockHashSlots to 8191. ;-)



We have set 31013. 

Today situation is much better, users are surprised with +30% speed increase, 
with 700 active connections:

LOCK_HEADER BLOCK
Version: 145, Active owner:  0, Length: 75440168, Used: 28721584
Flags: 0x0001
Enqs: 3143976306, Converts: 1574782, Rejects: 253168, Blocks: 6607562
Deadlock scans:  0, Deadlocks:  0, Scan interval:  10
Acquires: 3197419523, Acquire blocks:673, Spin count:   0
Mutex wait: 0.0%
Hash slots: 31013, Hash lengths (min/avg/max):0/   2/  11
Remove node:  0, Insert queue:  0, Insert prior:  0
Owners (736):   forward: 1369256, backward: 20828544
Free owners (35):   forward: 6090320, backward: 10504960
Free locks (4172):  forward: 262208, backward: 20547568
Free requests (14944):  forward: 17197144, backward: 3648808


Regards,
Alexey Kovyazin
IBSurgeon





RES: [firebird-support] For those who think they have performance problems

2014-02-20 Thread Fabiano - Desenvolvimento SCI
Strange thing is min hash length 358 and mutex wait only 0.1%!

 

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] 
Em nome de Alexey Kovyazin
Enviada em: quinta-feira, 20 de fevereiro de 2014 14:02
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] For those who think they have performance problems

 

  

Hi All,

Just got an amazing lock print.

This is real performance nightmare :)



LOCK_HEADER BLOCK

Version: 145, Active owner: 63554144, Length: 210763776, Used: 209783832

Flags: 0x0001

Enqs: 21025066275, Converts: 82460471, Rejects: 64835339, Blocks: 
594096759

Deadlock scans: 61, Deadlocks:  0, Scan interval:  10

Acquires: 25476138585, Acquire blocks: 34118657, Spin count:   0

Mutex wait: 0.1%

Hash slots: 1009, Hash lengths (min/avg/max):  358/ 403/ 445

Remove node:  0, Insert queue:  0, Insert prior:  0

Owners (728):   forward: 14876944, backward: 28924320

Free owners (160):  forward: 186465696, backward: 25763912

Free locks (78217): forward: 5469536, backward: 1074360

Free requests (386094): forward: 206130320, backward: 103961080

Lock Ordering: Enabled

Regards,
Alexey Kovyazin
www.IBSurgeon.com





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

2014-01-21 Thread Fabiano - Desenvolvimento SCI
How you solved your problem?

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Hugo Eyng
Enviada em: terça-feira, 21 de janeiro de 2014 10:24
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] Very very very slow FB 2.5.2 64bit
performance on Windows 2008 R2

 

  

Hi Helen.

Thanks for your answer.

You are right.

But the Windows 64 file cache performance  was a problem, as said Sean.

Só 'reserving' 10GB as a RAM DRIVE grant that I would have always available
RAM.

But now I solved the 'cache performance' and I will not need RAM DRIVE
anymore.

Even so, the FB performance is not compatible to the hardware used to run
it. 

Em 20/01/2014 23:12, Helen Borrie escreveu:

  

At 02:01 p.m. 21/01/2014, Hugo Eyng wrote:

As Firebird do not use available RAM I created a RAM DRIVE with 10GB and
pointed parameter 'TempDirectories' (firebird.conf) to this RAM DRIVE, but
FB just uses it rarely in very big 'SELECT'. OK, when FB uses the RAM DRIVE
it increases a SELECT speed in more than 80%. I expected FB could use this
for every SELECTS and so improve the application.

Fb uses RAM directly for sorts, if enough is available. It only takes the
sort sets to disk if available RAM is insufficient. 

Helen Borrie, Support Consultant, IBPhoenix (Pacific)
Author of The Firebird Book and The Firebird Book Second Edition
http://www.firebird-books.net
__ 





-- 
 
 
Atenciosamente,
 
Hugo Eyng





RES: [firebird-support] Migrate to Firebird 2.5.2 Win 32 from Firebird 3.0

2014-01-14 Thread Fabiano - Desenvolvimento SCI
OK! We will help!

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de LtColRDSChauhan
Enviada em: terça-feira, 14 de janeiro de 2014 11:26
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] Migrate to Firebird 2.5.2 Win 32 from Firebird
3.0

 

  

Please help me migrate to Firebird 2.5.2 from Firebird 3.0.


 

Thanks  Regards,

Lt Col (Retd) Rajiv Dular Singh Chauhan





RES: [firebird-support] Re: *** possible bug in FB 2.5.2 supperclassic with UDF ***

2013-11-28 Thread Fabiano - Desenvolvimento SCI
I read somewhere  that you must include Threads  in your uses clause to
ensure multithread memory allocation!

Google for it (USD, DELPHI, FIREBIRD, THREAD, USES).

MAYBE your random problem is when 2 concurrent users uses your UDF function
and try to allocate/dispose memory.

Sorry my bad english.

Fabiano.

 

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de ICAMSoft 
Enviada em: quinta-feira, 28 de novembro de 2013 08:44
Para: firebird-support@yahoogroups.com
Assunto: RE: [firebird-support] Re: *** possible bug in FB 2.5.2
supperclassic with UDF ***
Prioridade: Alta

 

  

Hi Dmitry,

Thanks for your reply.

 

 From that, i consider that the implementation of UDF is Ok and the
 problem is in Firebird itself

Very questionable conclusion.

 

Ok. i accept the point that too easily «debited» firebird for the problem,
given how much mature is and the extrensive period of testing before
release. My frank apology to all the community.

 

 Is possible to exist something wrong in the implementation of UDF that
 create problem only in super classic mode?

Yes, usage of malloc() instead of ib_util_malloc() results in random 
crashes often visible on some FB architectures and invisible in other ones.

 

The - very simple - code of udf follows 

(newer Delphi one for 64bit - The 32bit version is coded in Delphi7 slightly
differently but again create firebird collapse of firebird 32bit
Superclassic)

If somebody can help could be very good. 




unit FB2_Functions;

 

interface

uses StrUtils,SysUtils,Classes,ansistrings;

 

function ib_util_malloc(l: integer): pointer; cdecl; external 'ib_util.dll';

function icam_ansi_gr_uppercase(const p: PAnsiChar): PAnsiChar;  export;
cdecl;

 

function Ansi_GrUpper_Case(s:RawByteString):RawByteString;

var i,l:integer;

begin

   result:=trim(s);

   l:=Length(result);

   for i:=1 to l do begin

 case Result[i] of

  'a'..'z': Result[i]:= ansichar(Ord(Result[i])-32);

 end;

 case result[i] of

   'ά','α','Ά','A': result[i]:='Α';

   'γ': result[i]:='Γ';

   'δ': result[i]:='Δ';

   'ε','έ','Έ','E': result[i]:='Ε';

   'η','ή','Ή','H': result[i]:='Η';

   'θ' : result[i]:='Θ';

   'ι',#250,'ί','Ί','I': result[i]:='Ι';

   'λ' : result[i]:='Λ';

   'ξ' : result[i]:='Ξ';

   'ο','ό','Ό','O': result[i]:='Ο';

   'π' : result[i]:='Π';

   'υ','ύ','Ύ','Y': result[i]:='Υ';

   'φ' : result[i]:='Φ';

   'ψ' : result[i]:='Ψ';

   'ω','ώ','Ώ': result[i]:='Ω';

   #251,#224,'Ϋ': result[i]:='Υ';

   #192,'Ϊ': result[i]:='Ι';

   'σ','ς': result[i]:='Σ';

   'β','B': result[i]:='Β';

   'κ','K': result[i]:='Κ';

   'μ','M': result[i]:='Μ';

   'ν','N': result[i]:='Ν';

   'ρ','P': result[i]:='Ρ';

   'τ','T': result[i]:='Τ';

   'χ','X': result[i]:='Χ';

   'ζ','Z': result[i]:='Ζ';

 end;

   end;

end;

 

function icam_ansi_gr_uppercase(const p: PAnsiChar): PAnsiChar;   cdecl;

var s: RawByteString;

begin

  s := Ansi_GrUpper_Case(RawByteString(p));

  Result := ib_util_malloc(Length(s) + 1);

  StrPCopy(Result, s);

end;

 

Also i forgot to say in my first message 

the way i managed reproduce the problem in my devel.pc only in super classic
which is:

I run a very long update (regards 300 records) with extensive use of
given udf (is included in update trigger) and before 

it finishes, i run another update query for other table which regards some
records (2000) but also uses in update trigger the same udf.

Then - in super classic - collapse happens. If i run the query one by one is
ok. 

In SS or Classic everything runs ok in any case.

 

Best regards,

and thanks for any given help or thought.

 

From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Dmitry Yemanov
Sent: Thursday, November 28, 2013 12:59 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: *** possible bug in FB 2.5.2 supperclassic
with UDF ***

 

  

28.11.2013 14:30, ICAMSoft wrote:

 From that, i consider that the implementation of UDF is Ok and the
 problem is in Firebird itself

Very questionable conclusion.

 Is possible to exist something wrong in the implementation of UDF that
 create problem only in super classic mode?

Yes, usage of malloc() instead of ib_util_malloc() results in random 
crashes often visible on some FB architectures and invisible in other ones.

Dmitry

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3426 / Virus Database: 3629/6873 - Release Date: 11/27/13





RES: [firebird-support] Downgrade from 2.5 to 2.1

2013-11-28 Thread Fabiano - Desenvolvimento SCI
Maybe you are confusing yourself:

The problem now is that Super Server is not usi ng the full (SMP)
processing power of the hardware, than slowing things down

So, we need to get back to Firebird 2.1 Classic but could not figure out
how to do that (tried some options without success).

So, you know you need install FB Classic, but you said that you is using FB
Super Server. 

So, install FB 2.1 Classic for SMP support.



RES: [firebird-support] gfix -sweep Versus gbak -g

2013-11-04 Thread Fabiano - Desenvolvimento SCI
Hello Paul, I will take a look in your post latter.

The problem is exactly the same.

 

I discovered something:

In my case, I ran a command in QUERY A (is an auto generated stupid code):

Select * from my_table

With QUERY A opened, I run my report over the my_table table.

 

Then, I change my code of QUERY A to:

select first 0 * from my_table

 

Then my report runs all times at the same fast speed! Except first run is
slower maybe because it is freeing something. The problem appears to be some
king of table locking! It only occurs inside the same connection. When
another user runs select * from my_table and I ran my report everything is
fine. 

 

My report is generated by a stored procedure, I don't know if this have any
influence. 

 

Take a look about this and please let me know any news. 

Fabiano.

 

 

I forgot to say: We use an application server, we stop the server at 10PM do
disconnect/release all connections (and transactions) restart the
application server and then run gbak (suppressing -g parameter) and then
after this run gfix -sweep to effectively remove old record versions from
the database. This makes our application run smoth the entire day, day after
day.

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de
paul_mal...@kywb.uscourts.gov
Enviada em: segunda-feira, 4 de novembro de 2013 11:05
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] gfix -sweep Versus gbak -g

 

  

Hello Fabiano, 

Did you find a solution to the reports running slower with each successive
run?  I am having a similar problem that started when I upgraded from
Firebird version 2.1 to version 2.5.  My SQL queries run consistently fast
with Firebird 2.1, but when using Firebird 2.5, the query is as fast as 2.1
only for the first run.  Then each successive run of the query with Firebird
2.5 takes longer than the previous run.  Disconnecting and reconnecting to
the database will cause the query to run in the expected time for the first
run again, but then each run continues to slow down again until
disconnection/reconnecting.  Please see my post to the firebird-support mail
list on October 24, 2013 titled Query Performance Problem after Upgrading
from Firebird 2.1 to 2.5.  No one has responded to my issue.  The only
update that I have is I have also tried the Firebird Jaybird 2.2.3 JDBC
driver and have the same problem with Firebird 2.5 but not 2.1. 

Thank you, 
Paul


-

Confidentiality Notice: This message is the property of the United States
Bankruptcy Court for the Western District of Kentucky. It may be legally
privileged and/or confidential and is intended solely for the use of the
addressee. If the reader of this message is not the intended recipient, you
are hereby notified that any unauthorized disclosure, dissemination,
distribution, copying or taking any action in reliance on the information
contained herein is strictly prohibited. If you have received this message
in error, please immediately notify the sender and delete this message.





RES: [firebird-support] embedded server question

2013-10-31 Thread Fabiano - Desenvolvimento SCI
Embedded is used as a local database for a single system. 

IF you can connect more than once you will have a BIG database corruption,
read the embedded documentation.

You must use the regular Firebird installation -
Classic/SuperClassic/Superserver.

 

You can run an automatic Firebird installation, so the user will not need to
explicitly install Firebird as I suppose is the root of your question.

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Horváth Imre
Enviada em: quinta-feira, 31 de outubro de 2013 12:13
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] embedded server question

 

  

Hi,

I am planning to write an app with firebird 2.5.2 embedded version.

I have read that the embedded version doesn't accept multiple connections
from multiple apps, but only from one app.

My question: I have an app and the database file. This app is on a network
drive, so more user can start it. In this case, can the users connect to the
database? They run the same app.

Br.

Imre Horváth 





[firebird-support] gfix -sweep Versus gbak -g

2013-10-28 Thread Fabiano - Desenvolvimento SCI
Hello folks!

I'm Brazilian so sorry about some mistakes in the text below.



We have a new (~2 years old) system developed using Firebird 2.5.1 Classic.
We use Delphi XE2 + Datasnap with a strict transaction control, only 3 or 4
places on the application server control de entire transaction scope.

 

At the beginning of this project we developed a task manager (will call
TM) that runs a daily backup (gbak -g) on the production database and then
it restores that backup into a new database for testing purpose. Our clients
are not 24x7 usage (Accounting purpose software) so this task starts at
10PM. The intent of this is:



*Make a backup;

* Collect the garbage generated;

* Test if a corruption is found (If I can't backup AND restore that database
and alert is raised and the system stops for maintenance);

 

When a new version is released it is MANDATORY (by the TM) doing a backup
and restore cycle. 

 

All runs fine those years but last week our big client (140 simultaneous
users, 16Gb database) tell us the system is running slow and slow. We test a
report that run in FIRST time in 10 seconds. SECOND try and 40 seconds! 3
and 1 minute and 40 seconds. I disconnect all users and ran a backup,
nothing. 

 

Ran a gstat ans discovered that HAS old records versions what is odd to me
because I always presume that running a gbak -g will collect all garbage AND
discard old record versions. Then I run gfix -sweep and 10 minutes later the
system runs smooth with every report try running in 5 seconds.

 

Now my question: Does gbak -g do not remove old record version? I must run
gfix -sweep regularity (In a daily basis)? Besides server slow down, are any
danger involving run gfix -sweep in a production database?

 

Thanks!!
Fabiano. 



RES: [firebird-support] RE: Insert into Large Table is slowly!

2013-09-05 Thread Fabiano - Desenvolvimento SCI
Do you use Classic or SuperServer? Version?

How many cached pages? If you use Classic try increasing page buffers to 2000 
and try again. 

Let me know the results, thanks.

 

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] 
Em nome de chmere...@gmail.com
Enviada em: quinta-feira, 5 de setembro de 2013 11:58
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] RE: Insert into Large Table is slowly!

 

  

 

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

Hello, every body!

  I have a 180GB database. and have a large table in it. 

table's DDL is:

Create Table Table1

(

   f_MeterID Integer,

   f_CMDID smallInt,

   f_Time timestamp,

   f_Value Numric(12,2),

   f_RecTime Timestamp

);

Create Index idx_Table1 on(f_MeterID, f_CMDID, f_Time)

 

about 50,000 rows be inserted every hour. 

about 1.2 millions rows be inserted every day. 

about 500 millions rows every year.


CREATE GLOBAL TEMPORARY TableTemp (
 f_MeterID Integer,
 
) ON COMMIT DELETE ROWS;

ALTE R INDEX idx_Table1 INACTIVE;

I insert data use follow:

1. start a transaction

2. Insert a batch records into temp table TableTemp, It's structure like table1

3. Insert into Table1 select * from TableTemp

Delete Data From TableTemp

(about 30,000 record every tiime)

USE GLOBAL TEMPORARY

4. commit transaction

ALTER INDEX idx_Table1 ACTIVE

but now, insert data become very slowly.

 

What should I do?

 

thanks!

 

jimmy

Regards.





[firebird-support] Drawbacks of high LockHashSlots value

2013-09-03 Thread Fabiano - Desenvolvimento SCI
Hi list!

We have a customer with a poor performance today. I take a look and discover
that the HDD is very busy, then I run a fb_lock_print of that database and
it shows:

Mutex wait: 37.6%

Hash slots: 1009, Hash lengths (min/avg/max):   74/  98/ 128

 

Terrible numbers. Then I disconnect everything, chang LockHashSlots in
Firebird.conf to 4093 (more or less 4 times more that default 1009 and still
a prime number) and now the HDD is running smoth!

Now fb_lock_print shows:

Mutex wait: 15.9%

Hash slots: 4093, Hash lengths (min/avg/max):5/  18/  33

 

Much better but still worst. I planning to change it again to 8000+-. And I
hope I can get a mutex wait  5%.

Well, what is the drawback of using a high LockHashSlots? More than the
default 1009?

 

Environment: 

 

Windows Server 2008

Firebird Classic 2.5.1 64 bits

Ram size: 16Gb

Database Size: 13.2Gb

Concurrent simultaneous users: 118

Cached pages: 2000 for each connection (it was 90 some time ago, we
increased this value because low insert operations in large tables with 12+
indices. I think the problem became more obvious when we increase this value
- Ann told in and old mail that every cached page uses hash slots)

 

Thanks!



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



RES: Re[2]: [firebird-support] Drawbacks of high LockHashSlots value

2013-09-03 Thread Fabiano - Desenvolvimento SCI
Something weird occuring now:

Exactly now, I have 120 connections to the database. NO ONE is actually
using or using the database for nothing, just connected (0% of use of all 16
processors, no HDD usage…)

So, I get another fb_lock_print and it shows:

Mutex wait: 20.3%

Hash slots: 4093, Hash lengths (min/avg/max):9/  19/  34

 

Weird! No HDD usage, no process… Why it shows this? I suppose that it must
be Mutex wait: 0%! Why it’s not?

 

Now, I will change page cache from 2000 down to 1000 and rise up lock hashes
for 10009 and tomorrow I will take a look again.

Thanks!

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Dmitry Kuzmenko
Enviada em: terça-feira, 3 de setembro de 2013 16:33
Para: firebird-support@yahoogroups.com
Assunto: Re[2]: [firebird-support] Drawbacks of high LockHashSlots value

 

  

Hello, fabianoaspro!

Tuesday, September 3, 2013, 11:15:45 PM, you wrote:

fgc So what is the problem with changing this to 10009 by example? What is
the
fgc drawback?

none found. I think that Fabiano wanted to know about any drawbacks,
but ... here is only profit :-)

-- 
Dmitry Kuzmenko, www.ib-aid.com





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



RES: [firebird-support] Have a lots memory, but FB could not take advantages

2013-07-15 Thread Fabiano Kureck
Just increase Page Buffers



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



[firebird-support] Fluxo do software

2013-06-14 Thread Fabiano Kureck
Tenho algumas dúvidas quanto ao fluxo dos softwares:

 

A princípio se usa um programa CAD (AutoCad, Solidworks, etc) para gerar o
arquivo 3D .stl certo? 

Após isso se passa para no netfabb para que o arquivo stl seja
preparado/compatível com uma impressão 3D.

Então, passa-se pelo Slickr (algo assim) que pega o arquivo STL e gera um
GCODE. Nesse GCODE existem as 

fatias de impressão que contém a espessura de cada uma, temperatura do hot
end para cada fatia, velocidade

do cooler e etc. É isso?

 

Por fim, o Slickr manda o GCODE para o repetier host que é instalado no PC,
que passa pelo cabo usb/rs232

para o Repetier (marlin, etc) na placa Gen7BR/RAMPS/Sethi3d para que o
Repetier movimente os motores de 

passo.

 

Estou certo em meu raciocínio?



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



RES: [firebird-support] Fluxo do software

2013-06-14 Thread Fabiano Kureck
Sorry about that!

I posted on wrong place...



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



RES: [firebird-support] RDB$PAGES

2013-05-23 Thread Fabiano Kureck
Sorry is not rdb$database but another system table. I can´t remember its
name…

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Norman Dunbar
Enviada em: quinta-feira, 23 de maio de 2013 06:35
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] RDB$PAGES

 

  

Morning Tomas,

On 23/05/13 09:31, tomkrej wrote:
 Hi, I'd like to get the count of all types of db pages.

 If I run the query
 select count(*), rdb$page_type from rdb$pages group by rdb$page_type

 I got only about 2200 pages, but there are about 320 000 pages in DB.

 And the result of query contains only - 3, 4, 6 and 9 type of page.

 How can I get the real numbers??

 Best regards, Tomas

Unfortunately, you can't! This thread might help explain. 
http://sourceforge.net/mailarchive/message.php?msg_id=27114737

Cheers,
Norm.

-- 
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767





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



RES: [firebird-support] Re: use of -USE_ALL_SPACE

2013-05-03 Thread Fabiano Kureck
Yes, you are wright.
And in a particular Page it is only allowed a single type of:
Table Data or index or generator and so on

-Mensagem original-
De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de W O
Enviada em: sexta-feira, 3 de maio de 2013 12:42
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] Re: use of -USE_ALL_SPACE

Thank you very much Ann, your explanation was (as usual) very good.

Just one more question:

As I understand it, in a page just can be the rows (records) of a single
table. No two or more tables can share a page.

Am I right?

Greetings.

Walter.










On Fri, May 3, 2013 at 10:59 AM, Ann Harrison
aharri...@ibphoenix.comwrote:

 **


 Walter,


  As I understand it when a record is deleted a new primary version with a
  mark (a flag) is put on it indicating that fact and the previous version
 of
  the record is copied on another location (same page if there is room or
  another page if there is not)
 
  Is that true?
 

 More or less. A new deleted stub record - a header with no data - is
 created and stored on the record's home page. If there's not room on
 the home page for the deleted stub, then the oldest version of the record
 on the page will be moved elsewhere.

 It's probably worth noting, for those who are thinking about implementing
 relational database managers, that records can be relocated on page
 freely.

 The record number (RDB$DB_KEY and all its aliases) is the value
 used in indexes to identify a specific record. That number consists of
 a pointer page identifier - the ordinal number of a row in RDB$PAGES for
 pointer pages for that table - plus the offset on the pointer page that
 contains the page number of the record's home page, plus the offset
 of an index on that page that contains the offset and length of the data
 on page. So...

 1) Reorganizing data on a page just requires swapping values in the index
 for that page to maintain stable record numbers.

 2) All versions of a record use the same record number.

 3) Updating a record does not require changing all the indexes on the
 table. If the key doesn't change, neither does the index.

 However, once a record has been deleted and garbage collected, its
 record number is released and will be reused, so record numbers are
 not stable outside of a single transaction - unless you use a switch
 to make record numbers stable for your connection. Record numbers
 will change after a gbak restore.


 Good luck,

 Ann

 [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






RES: [firebird-support] Re: use of -USE_ALL_SPACE

2013-05-03 Thread Fabiano Kureck
You can take a look in the Firebird-Internals.pdf file. It can be found in
Firebird site.
It is very interesting! Read, create a demo database and use a hexadecimal
editor ;)

-Mensagem original-
De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de W O
Enviada em: sexta-feira, 3 de maio de 2013 14:20
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] Re: use of -USE_ALL_SPACE

That's very interesting Fabiano, thank you very much for your answer.

Greetings.

Walter.



On Fri, May 3, 2013 at 1:12 PM, Fabiano Kureck
fabianoas...@gmail.comwrote:

 **


 Yes, you are wright.
 And in a particular Page it is only allowed a single type of:
 Table Data or index or generator and so on

 -Mensagem original-
 De: firebird-support@yahoogroups.com
 [mailto:firebird-support@yahoogroups.com] Em nome de W O
 Enviada em: sexta-feira, 3 de maio de 2013 12:42
 Para: firebird-support@yahoogroups.com
 Assunto: Re: [firebird-support] Re: use of -USE_ALL_SPACE


 Thank you very much Ann, your explanation was (as usual) very good.

 Just one more question:

 As I understand it, in a page just can be the rows (records) of a single
 table. No two or more tables can share a page.

 Am I right?

 Greetings.

 Walter.

 On Fri, May 3, 2013 at 10:59 AM, Ann Harrison
 aharri...@ibphoenix.comwrote:

  **

 
 
  Walter,
 
 
   As I understand it when a record is deleted a new primary version with
 a
   mark (a flag) is put on it indicating that fact and the previous
 version
  of
   the record is copied on another location (same page if there is room
or
   another page if there is not)
  
   Is that true?
  
 
  More or less. A new deleted stub record - a header with no data - is
  created and stored on the record's home page. If there's not room on
  the home page for the deleted stub, then the oldest version of the
record
  on the page will be moved elsewhere.
 
  It's probably worth noting, for those who are thinking about
implementing
  relational database managers, that records can be relocated on page
  freely.
 
  The record number (RDB$DB_KEY and all its aliases) is the value
  used in indexes to identify a specific record. That number consists of
  a pointer page identifier - the ordinal number of a row in RDB$PAGES for
  pointer pages for that table - plus the offset on the pointer page that
  contains the page number of the record's home page, plus the offset
  of an index on that page that contains the offset and length of the data
  on page. So...
 
  1) Reorganizing data on a page just requires swapping values in the
index
  for that page to maintain stable record numbers.
 
  2) All versions of a record use the same record number.
 
  3) Updating a record does not require changing all the indexes on the
  table. If the key doesn't change, neither does the index.
 
  However, once a record has been deleted and garbage collected, its
  record number is released and will be reused, so record numbers are
  not stable outside of a single transaction - unless you use a switch
  to make record numbers stable for your connection. Record numbers
  will change after a gbak restore.
 
 
  Good luck,
 
  Ann
 
  [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

  



[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






RES: [firebird-support] Re: How to read the Memory buffers size via SQL?

2013-04-25 Thread Fabiano Kureck
THANK YOU!

It Will resolve my problem!

 

I will read this value and compare with a calculated value (number of
connections, etc) and then set a new value. We are having performance
problems when inserting a large amount of data in a huge table with a lot of
indexes.

 

We use a default 90 pages in a FB Classic 2.5.1 Windows server. Raising page
caches to a higher value like 200 resolve our problems. 

 

I will read the server memory amount, read our maximum simultaneous
connections and then calculate the 'best' and secure new page caches amount.
Maybe I can except some trouble with this approach?

 

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de hvlad
Enviada em: quinta-feira, 25 de abril de 2013 04:01
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] Re: How to read the Memory buffers size via
SQL?

 

  

--- In firebird-support@yahoogroups.com
mailto:firebird-support%40yahoogroups.com , Fabiano Kureck wrote:

 Hi!
 
 
 
 I must read the Memory Buffers parameter from the database using sql.
 
 I know that I can use gfix to change and gstat to read.
 
 
 
 I want to read it via a sql command. How do that?

In recent Firebird versions you can query MON$DATABASE table.

Regards,
Vlad





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



[firebird-support] How to read the Memory buffers size via SQL?

2013-04-24 Thread Fabiano Kureck
Hi!

 

I must read the Memory Buffers parameter from the database using sql.

I know that I can use gfix to change and gstat to read.

 

I want to read it via a sql command. How do that?

Thanks.

 

 

 



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



Re: RES: [firebird-support] Should i use UTF8 for all character fields in my database?

2012-12-03 Thread Fabiano






Hi all!

I would like to put a note here for other people who are planning to use UTF-8 
charsets and ci/ai collations.

The tests i realized before (in a previous message) didn't show the real 
numbers.

After doing more tests, i realized that searchs using LIKE, STARTING WITH, 
CONTAINING, etc... have an HUGE performance penalty when using UTF8 and CI/AI 
collation.

Here are the numbers, based on a table with 5.500 records and searching in a 
utf8 ci/ai field

select * from pl1_cidades c where c.nome = 'Americana'
78ms

select * from pl1_cidades c where c.nome like 'Americana'
12s75ms (!!!)

select * from pl1_cidades c where c.nome containing 'Americana'
6s208ms (!!!)

And here are the numbers, based on a table with 5.500 records and searching in 
a iso8851-1 field:

select * from pl1_cidadesa c where c.nome = 'Americana'
78ms

select * from pl1_cidadesa c where c.nome like 'Americana'
98ms

select * from pl1_cidadesa c where c.nome containing 'Americana'
98ms

So, unless there are some plans to improve UTF8 searchs a lot in next firebird 
versions, for now i think it's a risk to use this charset if your project will 
need to use SQL instructions like above.

Regards,

Fabiano

--- In firebird-support@yahoogroups.com, Fabiano fabiano@... wrote:

 Hi!
 
 I tried that (actually inserted 50.000 records each table), and here follows 
 the test results:
 
 recreate table test_utf8 (
   column1 varchar(100) character set UTF8 collate unicode_ci_ai);
 
 recreate table test_iso8859_1 (
   column1 varchar(100) character set ISO8859_1 collate pt_br);
 
 -- 1m5s146
 set term !! ;
 execute block
 as
   declare variable i integer;
 begin
   i = 0;
   while (i  5) do
   begin
 insert into test_utf8 values (uuid_to_char(gen_uuid()));
 i = i + 1;
   end
   insert into test_utf8 values ('xxx');
 end !!
 set term ; !!
 
 -- 1m4s959
 set term !! ;
 execute block
 as
   declare variable i integer;
 begin
   i = 0;
   while (i  5) do
   begin
 insert into test_iso8859_1 values (uuid_to_char(gen_uuid()));
 i = i + 1;
   end
   insert into test_iso8859_1 values ('xxx');
 end !!
 set term ; !!
 
 -- 0s468
 select * from test_utf8 where column1 = 'xxx';
 
 -- 0s561
 select * from test_iso8859_1 where column1 = 'xxx';
 
 -- 1s716, 1s653, 1s841
 select first 1 * from test_utf8 order by column1;
 
 -- 0s671, 0s717, 0s748
 select first 1 * from test_iso8859_1 order by column1;
 
 So, the main performance difference here was ordering the data (2X-3X 
 slower). Other operations seems to have the same performance (althought i 
 didn´t use special characters in the records).
 
 Regards,
 
 Fabiano
 
 --- In firebird-support@yahoogroups.com, Fabiano fabianoaspro@ wrote:
 
  Firebird is extreme slow with UTF-8 character set.
  
  Try it:
  Create the same table with/without UTF-8 encoding, put 5000 records with no
  indexes then do:
  
  'select * from table order by fieldA
  
  select * from table where FieldA=''
  
   
  
  Cheers
  
   
  
  
  
  [Non-text portions of this message have been removed]
 




RES: [firebird-support] Re: Problem slow sorting/distinct in Firebird

2012-11-20 Thread Fabiano
Thanks Poul!

 

The unique problem with this approach is when you have a null value in one
of these columns it will not work correctly.

So, the 'correct' way is use coalesce do convert null value in empty string:

(LCASE(coalesce(art.Artikelnummer , '')||
coalesce(art.Artikelnr_leverancier, '')) like '%a4 papier%')

Another tip is create a calculated column in the table with the above
statement - with the name find_name.

So, you can easily write a simple SQL like:

Select * from some_table where find_name like '%a4 papier%'







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



RES: [firebird-support] Re: Problem slow sorting/distinct in Firebird

2012-11-19 Thread Fabiano
I think the problem is the use of LCASE(something) like '% something%'

When FB encounter a %% statement it will perform a full table scan. If you
have 10 statements like this (and you have much more) you have at least 10
full table scans to do the job.

 

First: Rewrite your SQL code and DO NOT USE no one %% statement. Check if
you have the correct indexes (tr.ItemType, tr.Marke1, tr.NODELEVEL,
tr.LINKTYPE) - Try one index for all these fields first.

 

When you finish you will have a very fast statement. The next step is create
concatenate all columns in a virtual one and do only one %% statement.
Example:

 

Istead of:

(LCASE(art.Artikelnummer) like '%a4 papier%') or
(LCASE(art.Artikelnr_leverancier) like '%a4 papier%')

 

Use:

(LCASE(art.Artikelnummer|| art.Artikelnr_leverancier) like '%a4 papier%')

 

In this case FB will do only ONE full table scan instead of 2 from the above
example.

 

Sorry about my poor English, I hope you can understand my point of view. If
you need more help create a simple database with these tables populated
inside and publish on the internet and answer with the link to download.

 

Fabiano.



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



RES: [firebird-support] Learning Curve

2012-11-08 Thread Fabiano
You can go to www.firebirdsql.org and take a look at the gbak users manual. 

There are information about restoring a database backup (fbk) - I think it
is you want.

Maybe is a good point use the same Firebird version (1.0, 1.5, 2.0, 2.1,
2.5, .) to restore your database. MySQL manual will not help you in this
task.

Fabiano



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



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

2012-10-29 Thread Fabiano
Performance is not only memory, is a combination of network speed, hard
drive speed, memory size and speed and finally processor(s) speed.

You do not need to do that. Maybe if you do not know exactly what are you
doing you can get worst performance.



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



RES: [firebird-support] 2.5.1 terribly slower than 2.0 in views + expressions

2012-10-10 Thread Fabiano
Is there are way to avoid this behavior?
Thank you

In our company no longer use any view because of this behavior! It 'fix' the
performance problem.

(We also use FB 2.5.1)

 



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



RES: [firebird-support] How to make queries to a temporary result set

2012-09-21 Thread Fabiano
Maybe:

 

Select * from

(

  select * from table where field1 = 1

) as FILTER

Where FILTER.field2 = 2

 

Fabiano.



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



Re: RES: [firebird-support] Should i use UTF8 for all character fields in my database?

2012-09-20 Thread Fabiano
Hi, Thomas, thank you for testing.

It seems, despite the environment, we can expect some performance loss using 
fields with UTF8.

Btw, i also have a server with SSD (and RAID), and the performance of firebird 
compared to a regular HDD is amazing.

Operations which takes minutes in a (forced-writes OFF) database in HDD takes 
seconds in a (forced-writes ON) database in SSD.

Regards,

Fabiano





RES: [firebird-support] Should i use UTF8 for all character fields in my database?

2012-09-19 Thread Fabiano
Firebird is extreme slow with UTF-8 character set.

Try it:
Create the same table with/without UTF-8 encoding, put 5000 records with no
indexes then do:

'select * from table order by fieldA

select * from table where FieldA=''

 

Cheers

 



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



Re: RES: [firebird-support] Should i use UTF8 for all character fields in my database?

2012-09-19 Thread Fabiano
Hi!

I tried that (actually inserted 50.000 records each table), and here follows 
the test results:

recreate table test_utf8 (
  column1 varchar(100) character set UTF8 collate unicode_ci_ai);

recreate table test_iso8859_1 (
  column1 varchar(100) character set ISO8859_1 collate pt_br);

-- 1m5s146
set term !! ;
execute block
as
  declare variable i integer;
begin
  i = 0;
  while (i  5) do
  begin
insert into test_utf8 values (uuid_to_char(gen_uuid()));
i = i + 1;
  end
  insert into test_utf8 values ('xxx');
end !!
set term ; !!

-- 1m4s959
set term !! ;
execute block
as
  declare variable i integer;
begin
  i = 0;
  while (i  5) do
  begin
insert into test_iso8859_1 values (uuid_to_char(gen_uuid()));
i = i + 1;
  end
  insert into test_iso8859_1 values ('xxx');
end !!
set term ; !!

-- 0s468
select * from test_utf8 where column1 = 'xxx';

-- 0s561
select * from test_iso8859_1 where column1 = 'xxx';

-- 1s716, 1s653, 1s841
select first 1 * from test_utf8 order by column1;

-- 0s671, 0s717, 0s748
select first 1 * from test_iso8859_1 order by column1;

So, the main performance difference here was ordering the data (2X-3X slower). 
Other operations seems to have the same performance (althought i didn´t use 
special characters in the records).

Regards,

Fabiano

--- In firebird-support@yahoogroups.com, Fabiano fabianoaspro@... wrote:

 Firebird is extreme slow with UTF-8 character set.
 
 Try it:
 Create the same table with/without UTF-8 encoding, put 5000 records with no
 indexes then do:
 
 'select * from table order by fieldA
 
 select * from table where FieldA=''
 
  
 
 Cheers
 
  
 
 
 
 [Non-text portions of this message have been removed]





RES: [firebird-support] Firebird 2.5.1 to 2.5.2

2012-09-18 Thread Fabiano
The database is bigger than the RAM memory?

If yes this is an issue of 2.5.1

 

You do not need a backup/restore cycle for migrating to 2.5.2

Fabiano

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de todderamaa
Enviada em: terça-feira, 18 de setembro de 2012 12:22
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] Firebird 2.5.1 to 2.5.2

 

  

We are having an issue with caching when using Firebird 2.5.1 on a Windows
Server 2008 box. The system flies when turning forced writes off, but we
don't want to operate that way.

The strange thing is that we have a number of clients using 2.5.1 on Windows
Server 2008 and nobody has brought up performance issues.

Anyhow, we were reading about 2.5.2 and how there was a problem with caching
that was fixed. We are going to try the beta version that is out.

Do we need to backup on 2.5.1 and restore to 2.5.2?

Any help with this issue would be appreciated.

Todd Brasseur
Compass Municipal Services Inc.
HOME OF CAMAlot



  _  

Nenhum vírus encontrado nessa mensagem.
Verificado por AVG - www.avgbrasil.com.br
Versão: 2012.0.2221 / Banco de dados de vírus: 2437/5275 - Data de
Lançamento: 09/18/12



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



RES: [firebird-support] Re: Firebird 2.5.1 to 2.5.2

2012-09-18 Thread Fabiano
 Do we need to backup on 2.5.1 and restore to 2.5.2?

 In this particular case, you do need backup/restore.

 Dmitry

__._,_._

I´m curious Dmitry, why?

 

__



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



RES: RES: [firebird-support] Firebird 2.5.1 to 2.5.2

2012-09-18 Thread Fabiano
I have a guess!

What is the database Server? Is a truly *Dell* server? (Like Dell PowerEdge
T410)

If yes, make sure the hardware that control the HD HAS cache! 

 

If it doesn´t have the problem is it! 

To solve that replace the disk controller or use another server…



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



RES: RES: RES: [firebird-support] Firebird 2.5.1 to 2.5.2

2012-09-18 Thread Fabiano
Maybe you can go to the Dell website and check this.

In Portuguese is “controladora SAS6/IR (suporta apenas RAID 0 e 1), sem
cachê).” 

Or SAS6/IR controller with no cache.

 

Maybe you can call them and check this (sorry I have no internet connection)

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de todderamaa
Enviada em: terça-feira, 18 de setembro de 2012 14:14
Para: firebird-support@yahoogroups.com
Assunto: Re: RES: RES: [firebird-support] Firebird 2.5.1 to 2.5.2

 

  

It is a Dell Server (Power Edge T110).

How can I tell if the hardware that controls the HD has cache?

Todd

--- In firebird-support@yahoogroups.com
mailto:firebird-support%40yahoogroups.com , Fabiano fabianoaspro@...
wrote:

 I have a guess!
 
 What is the database Server? Is a truly *Dell* server? (Like Dell
PowerEdge
 T410)
 
 If yes, make sure the hardware that control the HD HAS cache! 
 
 
 
 If it doesn´t have the problem is it! 
 
 To solve that replace the disk controller or use another server…
 
 
 
 [Non-text portions of this message have been removed]




  _  

Nenhum vírus encontrado nessa mensagem.
Verificado por AVG - www.avgbrasil.com.br
Versão: 2012.0.2221 / Banco de dados de vírus: 2437/5275 - Data de
Lançamento: 09/18/12



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



RES: RES: RES: [firebird-support] Firebird 2.5.1 to 2.5.2

2012-09-18 Thread Fabiano
In our test we can turn on but there are no result in terms of performance.

Is a hardware issue.

I think changing the disk controller and turning write caching on does not
have any problem – is the default installation on Windows!

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de todderamaa
Enviada em: terça-feira, 18 de setembro de 2012 14:31
Para: firebird-support@yahoogroups.com
Assunto: Re: RES: RES: [firebird-support] Firebird 2.5.1 to 2.5.2

 

  

I believe this is the problem.

We found the setting when looking at the Device Manager. The 'enable write
caching' is turned off. It won't allow us to turn it on. I am guess the
hardware doesn't allow it.

In the Windows Help it mentions that turning it on can cause issues with
corruption. 

Are these the same issues as we have if we turn 'forced writes off' in
Firebird? 

I am thinking the risk of 'forced writes off' in Firebird is greater than
turning write caching on in Windows.

Todd

--- In firebird-support@yahoogroups.com
mailto:firebird-support%40yahoogroups.com , todderamaa todderamaa@...
wrote:

 It is a Dell Server (Power Edge T110).
 
 How can I tell if the hardware that controls the HD has cache?
 
 Todd
 
 --- In firebird-support@yahoogroups.com
mailto:firebird-support%40yahoogroups.com , Fabiano fabianoaspro@
wrote:
 
  I have a guess!
  
  What is the database Server? Is a truly *Dell* server? (Like Dell
PowerEdge
  T410)
  
  If yes, make sure the hardware that control the HD HAS cache! 
  
  
  
  If it doesn´t have the problem is it! 
  
  To solve that replace the disk controller or use another server…
  
  
  
  [Non-text portions of this message have been removed]
 




  _  

Nenhum vírus encontrado nessa mensagem.
Verificado por AVG - www.avgbrasil.com.br
Versão: 2012.0.2221 / Banco de dados de vírus: 2437/5275 - Data de
Lançamento: 09/18/12



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



[firebird-support] Should i use UTF8 for all character fields in my database?

2012-09-18 Thread Fabiano
Hi all!

Today it seems easier and simpler for me to create all character fields encoded 
in UTF8.

Is there something against doing this?

I asked some days ago about index sizes in this post 
(http://tech.groups.yahoo.com/group/firebird-support/message/119234), and it 
seems UTF8 can generate indices keys up to 4X larger than a usual key.

As the majority of characters stored in these fields are below code 127 in 
ASCII table, with some rare accents and special symbols, i would like to know 
if using UTF8 should increase too much my database or affect its performance.

Regards,

Fabiano



RES: [firebird-support] problem with restore

2012-09-12 Thread Fabiano
Analyze what field compounds the RDB$INDEX_39 indice.

After restoring the database you will find out that you have duplicated
values in this table.

It is a slight corruption. You must delete the duplicated values and then
active this index. Then make a full backup/restore cycle.

 

Because of this things is important to always test your backups to known if
theirs can be restored.

 

Sorry my poor English.
Fabiano.

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Sergio
Enviada em: quarta-feira, 12 de setembro de 2012 11:26
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] problem with restore

 

  

Hello! I'm having a problem when I restore a database (just in case: the
backup was made with -meta_data option)

I'm getting this error message, but I can't find where is the RDB$INDEX_39.
I use FlameRobin...

gbak: restoring SQL role: RDB$ADMIN

gbak: ERROR:attempt to store duplicate value (visible to active
transactions) in unique index RDB$INDEX_39

gbak:Exiting before completion due to errors



  _  

Nenhum vírus encontrado nessa mensagem.
Verificado por AVG - www.avgbrasil.com.br
Versão: 2012.0.2221 / Banco de dados de vírus: 2437/5264 - Data de
Lançamento: 09/12/12



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



RES: RES: [firebird-support] problem with restore

2012-09-12 Thread Fabiano
You MUST always use the same gbak version to make backups!

 

Well I use IBExpert, I never used FlameRobin. In IBExpert I write the index
name on a search box, then double click it and then IBExpert shows the table
and indices that makes that indice.

 

Fabiano

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Sergio
Enviada em: quarta-feira, 12 de setembro de 2012 11:35
Para: firebird-support@yahoogroups.com
Assunto: Re: RES: [firebird-support] problem with restore

 

  

Thanks Fabiano! 

By mistake, I was using an old gbak with a 2.5 databse. With the correct
gbak the problem in gone!!!

By the way... How can seek that index? I did a metadata search with
FlameRobin, but it returned nothing... 

Thanks again!

-s

--- Fabiano fabianoaspro@... wrote:

 Analyze what field compounds the RDB$INDEX_39 indice.



  _  

Nenhum vírus encontrado nessa mensagem.
Verificado por AVG - www.avgbrasil.com.br
Versão: 2012.0.2221 / Banco de dados de vírus: 2437/5264 - Data de
Lançamento: 09/12/12



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



RES: [firebird-support] mon$attachments versus fb_inet_server processes

2012-09-12 Thread Fabiano
Well this computer (server database) has only this database and is
exclusively used as a database server.

All connections are made by a Delphi XE2 DataSnap server application, all
them with SYSDBA user.

I logged as SYSDBA user when running the select statement.

 

Any other guess?

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Thomas Steinmaurer
Enviada em: quarta-feira, 12 de setembro de 2012 12:36
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] mon$attachments versus fb_inet_server
processes

 

  

 Some strange things are occuring with my Firebird Classic 2.5.1 (Windows
 server 2008) right now:



 When I runs this statement (select count(*) from mon$attachments) it
returns
 113 connections to me but then I count the number of fb_inet_server.exe
 running process I reach the number 220!

* MON$ATTACHMENTS is for a particular database. If you have not only one 
database, the processes might be from connections to other databases.

* AFAIR, you won't see all attachments when querying the monitoring 
tables with a Non-SYSDBA user.

Regards,
Thomas



  _  

Nenhum vírus encontrado nessa mensagem.
Verificado por AVG - www.avgbrasil.com.br
Versão: 2012.0.2221 / Banco de dados de vírus: 2437/5264 - Data de
Lançamento: 09/12/12



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



RES: [firebird-support] Re: Can't continue after bugcheck

2012-09-12 Thread Fabiano
We have this same issue some times in our server. The solution is restart de
database server – I never tested stop and start the Firebird process…

 

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Dmitry Yemanov
Enviada em: quarta-feira, 12 de setembro de 2012 12:54
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] Re: Can't continue after bugcheck

 

  

12.09.2012 19:42, Rick Debay wrote:

 Rarely I'll get this error, and it goes away after recreating the
 connection.
 Neither gbak (backup  restore) nor gfix (validate) report errors.
 What should be my next steps?

Look at firebird.log and figure out the reason.
It's logged right before you get that error.

Dmitry



  _  

Nenhum vírus encontrado nessa mensagem.
Verificado por AVG - www.avgbrasil.com.br
Versão: 2012.0.2221 / Banco de dados de vírus: 2437/5264 - Data de
Lançamento: 09/12/12



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



RES: [firebird-support] Re: Can't continue after bugcheck

2012-09-12 Thread Fabiano
We have this same issue some times in our server. The solution is restart de
database server – I never tested stop and start the Firebird process…

 

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Dmitry Yemanov
Enviada em: quarta-feira, 12 de setembro de 2012 12:54
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] Re: Can't continue after bugcheck

 

  

12.09.2012 19:42, Rick Debay wrote:

 Rarely I'll get this error, and it goes away after recreating the
 connection.
 Neither gbak (backup  restore) nor gfix (validate) report errors.
 What should be my next steps?

Look at firebird.log and figure out the reason.
It's logged right before you get that error.

Dmitry



  _  

Nenhum vírus encontrado nessa mensagem.
Verificado por AVG - www.avgbrasil.com.br
Versão: 2012.0.2221 / Banco de dados de vírus: 2437/5264 - Data de
Lançamento: 09/12/12



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



RES: RES: RES: [firebird-support] problem with restore

2012-09-12 Thread Fabiano
Sorry, I correct this mistake.

Thanks.

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Mark Rotteveel
Enviada em: quarta-feira, 12 de setembro de 2012 13:47
Para: firebird-support@yahoogroups.com
Assunto: Re: RES: RES: [firebird-support] problem with restore

 

  

On 16-9-2012 16:38, Fabiano wrote:
^^

Fabiano,

You might want to check the date settings on your computer, it is set 4 
days in the future.

Mark
-- 
Mark Rotteveel



  _  

Nenhum vírus encontrado nessa mensagem.
Verificado por AVG - www.avgbrasil.com.br
Versão: 2012.0.2221 / Banco de dados de vírus: 2437/5264 - Data de
Lançamento: 09/12/12



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



RES: [firebird-support] mon$attachments versus fb_inet_server processes

2012-09-12 Thread Fabiano
Helen, thanks for this advice.

 

But, how can I found if I are using the Guardian? There is no other Firebird
process running, only fb_inet_server.exe

I also checked the running Windows Services and the only one is Firebird
Server - DefaultInstance.

Fabiano.



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



[firebird-support] FB stopped acception connections

2012-09-01 Thread Fabiano
Hi list!
I have a problem with my Firebird Classic 2.5.1 Windows:

 

When a user open my system I also open a connection to a Firebird server.
The problem occurs when multiple users create multiple connections in
Firebird server on a little amount of time.

Ex.:

20 users in 2 seconds.

 

When it occurs, the Firebird servers stop accepting new connections. Some
time latter if accept new connections. 

If this 20 users connects in 1 minute it does not occurs.

 

How can I force Firebird to connect? Maybe this behavior is a anti-brute
force technique.

Fabiano.

 

 



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



RES: [firebird-support] Re: How to list the tables and field wich use the primary key from one table as FK

2012-07-31 Thread Fabiano
Try a program named memtest86

It runs at system startup and detects defective memory modules. 

As you have minor corruption problems it appears to be a memory problem.

 

Maybe a F8 in windows initialization have a memory test program too.

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de harveypekkar
Enviada em: terça-feira, 31 de julho de 2012 10:33
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] Re: How to list the tables and field wich use
the primary key from one table as FK

 

  

Very nice ! the script list exactly what I need , thank you very much .
About the influence about dev team I agree too , but they keep saying that
the corruption problem do not come from update or new script , another
problem is that our new deployement system work with patch , before we did
backup/restore for each major update , that was a little constraint but
there was less errors , at least corruption problem were discover before
going too big .
I hope to find someday the cause of corruption with no doubt about it source
, for now i am not experienced enough to do this , I keep working on my
repair tool and after that maybe I will find out why .

Many thank for your help and Alan too , have a nice day .
regards , 

--- In firebird-support@yahoogroups.com
mailto:firebird-support%40yahoogroups.com , Svein Erling Tysvær
svein.erling.tysvaer@... wrote:

 I think you are 100 % right , the problem is that i am not working in the
developpement team but in customer 
 support , I suspect some software update to cause the problem but I have
no access on that , the only thing I can 
 do is to try to repair the best way for my client and I can't only
validate and mend , I have also to put back the 
 records from a backup with new ID or the problem will not be solve
completely .
 
 We have about 500 servers too, the structure is from 2 up to 20 clients ,
little workgroup under windows XP and 7
 
 I don't think the problem concern the firebird side , I know it's very
strenght.
 
 You also ought to try to influence your development team somehow.
Normally, it would not be OK for you to have 100 corruptions (assuming an
average of 2 per week) when Alan hasn't experienced any corruption at all.
Hardware problems and faulty UDFs used to be ways to make Firebird fail.
 
 The following may or may not help you:
 
 select i.rdb$relation_name, iseg.rdb$field_name
 from rdb$relation_constraints rec
 join rdb$ref_constraints rfc on rec.rdb$constraint_name =
rfc.rdb$constraint_name
 join rdb$relation_constraints rec2 on rfc.rdb$const_name_uq =
rec2.rdb$constraint_name
 join rdb$index_segments iseg2 on rec2.rdb$index_name =
iseg2.rdb$index_name
 join rdb$indices i2 on rec2.rdb$index_name = i2.rdb$index_name
 join rdb$indices i on rec.rdb$index_name = i.rdb$index_name
 join rdb$index_segments iseg on rec.rdb$index_name = iseg.rdb$index_name
 where i2.rdb$relation_name = :MyTableName
 and iseg2.rdb$field_name = :MyPKFieldName
 
 It is not tested, I know it does prepare and that it is possible to get
some results, but I don't know if they are correct or complete (I'm assuming
one field for each primary key).
 
 HTH,
 Set






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



[firebird-support] FB on Linux installation question

2012-07-23 Thread Fabiano
Hi all.

 

A new customer Will use a Linux machine to run the Firebird server. Actually
he will be the first customer to do that. 

I have read that (at last with FB 1.5 to 2.0) the linux kernel need to be
2.4.x to run Classic with a lot of connections. 

This issue also occurs on FB 2.5.1 Classic?

 

Another tip is that writes on ext4 file system is slower than ext3 if
'barrier' was ON. I can figure out the best file system to this customer.
Ext4 with/without barrier or ext3? The best for me is stability, I don't
want to easily corrupt my database on a fast partition. (power down
problems, etc).

 

What are the best fast/secure balanced partition type?

 

And finally - forced writes. I read that this configuration works on Linux
with FB 2.5.x. What is the best configuration?

 

It someone have any tips of software installation on linux and maybe
hardware please fells free to answer.

Thanks, Fabiano.

 



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



RES: [firebird-support] FB on Linux installation question

2012-07-23 Thread Fabiano
What the file system used?

What are the kernel version?

Thanks

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Poul Dige
Enviada em: segunda-feira, 23 de julho de 2012 11:18
Para: firebird-support@yahoogroups.com
Assunto: SV: [firebird-support] FB on Linux installation question

 

  

Hi Fabiano,

We tried 2.5.1 SC on Ubuntu 11. We had quite strange experience with the
FB-server constantly crashing (every 20 minutes or so) with anything from
40-150 connections, AFAIR. No data corruption, but lots of annoyed
customers. We switched to W2k8 and the problem was gone. I'd love to find
out what went wrong but we were in no position to experiment as it was
production environment, so it just had to work. Unfortunately, as I'd prefer
to run it under Linux.

I don't say that you will experience the same, but do be aware if it
happens!

Best regards
Poul

Fra: firebird-support@yahoogroups.com
mailto:firebird-support%40yahoogroups.com
[mailto:firebird-support@yahoogroups.com
mailto:firebird-support%40yahoogroups.com ] På vegne af Fabiano
Sendt: 23. juli 2012 15:17
Til: firebird-support@yahoogroups.com
mailto:firebird-support%40yahoogroups.com 
Emne: [firebird-support] FB on Linux installation question

Hi all.

A new customer Will use a Linux machine to run the Firebird server. Actually
he will be the first customer to do that.

I have read that (at last with FB 1.5 to 2.0) the linux kernel need to be
2.4.x to run Classic with a lot of connections.

This issue also occurs on FB 2.5.1 Classic?

Another tip is that writes on ext4 file system is slower than ext3 if
'barrier' was ON. I can figure out the best file system to this customer.
Ext4 with/without barrier or ext3? The best for me is stability, I don't
want to easily corrupt my database on a fast partition. (power down
problems, etc).

What are the best fast/secure balanced partition type?

And finally - forced writes. I read that this configuration works on Linux
with FB 2.5.x. What is the best configuration?

It someone have any tips of software installation on linux and maybe
hardware please fells free to answer.

Thanks, Fabiano.

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

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





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



RES: SV: [firebird-support] FB on Linux installation question

2012-07-23 Thread Fabiano
What are the file system used?

What the kernel version of CentOS 6.3?

Thanks

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de jugglingjester
Enviada em: segunda-feira, 23 de julho de 2012 13:42
Para: firebird-support@yahoogroups.com
Assunto: Re: SV: [firebird-support] FB on Linux installation question

 

  



Hej, 

i've done a little bit of connection and load testing the last days.

Used an old HP Compaq 6910p, 2 Cores, 4 GB RAM, 4 GB SWAP as server, running
on CEntOS 6.3. Installed with the minimal ISO, using only the CEntOS
repository.
Installed Firebird 2.5.1 from the .tar.gz, not the rpm. 

Our developers have provided me with a testing tool to open n connections
and start a query in each connection. 

500 Connections+ from 4 client, no error at all. Peaking at roundabout
750-800 connections the server wasn't able to response due to massive
swapping. Less than 5 % RAM and 5 % swap free, left the clients and the
server for an hour (went for lunch :-) in that condition - not an error at
all. 

hth, Marcus

--- In firebird-support@yahoogroups.com
mailto:firebird-support%40yahoogroups.com , Poul Dige pd@... wrote:

 Hi Fabiano,
 
 We tried 2.5.1 SC on Ubuntu 11. We had quite strange experience with the
FB-server constantly crashing (every 20 minutes or so) with anything from
40-150 connections, AFAIR. No data corruption, but lots of annoyed
customers. We switched to W2k8 and the problem was gone. I'd love to find
out what went wrong but we were in no position to experiment as it was
production environment, so it just had to work. Unfortunately, as I'd prefer
to run it under Linux.
 
 I don't say that you will experience the same, but do be aware if it
happens!
 
 Best regards
 Poul
 
 
 
 Fra: firebird-support@yahoogroups.com
mailto:firebird-support%40yahoogroups.com
[mailto:firebird-support@yahoogroups.com
mailto:firebird-support%40yahoogroups.com ] På vegne af Fabiano
 Sendt: 23. juli 2012 15:17
 Til: firebird-support@yahoogroups.com
mailto:firebird-support%40yahoogroups.com 
 Emne: [firebird-support] FB on Linux installation question
 
 
 
 Hi all.
 
 A new customer Will use a Linux machine to run the Firebird server.
Actually
 he will be the first customer to do that.
 
 I have read that (at last with FB 1.5 to 2.0) the linux kernel need to be
 2.4.x to run Classic with a lot of connections.
 
 This issue also occurs on FB 2.5.1 Classic?
 
 Another tip is that writes on ext4 file system is slower than ext3 if
 'barrier' was ON. I can figure out the best file system to this customer.
 Ext4 with/without barrier or ext3? The best for me is stability, I don't
 want to easily corrupt my database on a fast partition. (power down
 problems, etc).
 
 What are the best fast/secure balanced partition type?
 
 And finally - forced writes. I read that this configuration works on Linux
 with FB 2.5.x. What is the best configuration?
 
 It someone have any tips of software installation on linux and maybe
 hardware please fells free to answer.
 
 Thanks, Fabiano.
 
 [Non-text portions of this message have been removed]
 
 
 
 [Non-text portions of this message have been removed]






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



RES: [firebird-support] How to improve update performance with millions records?

2012-06-11 Thread Fabiano
What frequency do you backup/restore this database?

What firebird version? SS CS? 

What your garbage policy?

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de firebird_jimmy
Enviada em: segunda-feira, 11 de junho de 2012 10:01
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] How to improve update performance with millions
records?

 

  

Hi, I'm jimmy
I have a problem, please help me!
I have a table with 3,000,000 rows record, every row update 1 to 5 times in
one day. The speed of update statement become slowly, about 30
records/second, but insert speed above 1000 records/second.
Is my usage be bad or not? 
what should i do? 

thanks!

20120610





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



RES: [firebird-support] Copy of the current db not updating generators

2012-05-31 Thread Fabiano
Never copy the FDB file! You WILL corrupt both FDB and copy file!

The best approach is do a gbak to backup and then restore the FDB.

You MUST read the firebird FAQ here: http://www.firebirdfaq.org/

Also: http://www.firebirdsql.org/manual/qsg10-howtocorrupt.html 

and 

http://www.firebirdsql.org/manual/qsg10-backup.html



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



RES: RES: [firebird-support] Copy of the current db not updating generators

2012-05-31 Thread Fabiano
Also: google for “How to corrupt a Firebird database”. Even Anti Virus programs 
can (rarely) corrupt a database.

Fabiano



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



RES: [firebird-support] Re: Firebird hangs for a while blocking all DB operations periodically.

2012-05-30 Thread Fabiano
The blocking beavior is for SS/SC? The Classic version has an different GC
and maybe it does not occur.

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de nathanelrick
Enviada em: quarta-feira, 30 de maio de 2012 12:55
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] Re: Firebird hangs for a while blocking all DB
operations periodically.

 

  

it's exactly the same for us :( it's garbage collection !

when the garbage collection start, then any connection that try to load any
row that are in the process of the garbage collection are blocked (freezed)
! in fact all the connection that try to select anything on the table are
freeze ... this from several min, to sometime even hours !! of course it's a
disaster :(

for us the garbage collect start after we do a massive delete.

to emulate it ... simple, delete severals thousands rows, and do a select
AFTER this delete ... you will see that the select is block an ALL OTHER
selects too :(

i m now thinging about mysql to solve this probleme (just to move our
session table to mysql database), but i m not sure that mysql will not have
the same probleme. anyone here can confirm ?

--- In firebird-support@yahoogroups.com
mailto:firebird-support%40yahoogroups.com , anthonyjang2012
anthony@... wrote:

 We don't do anything particularly special in deletes / updates once a
month. The last two times we have observed this issue, it occurred during a
DB sweep so perhaps it is related to garbage collection. The strange thing
is that everything is blocked, even other existing DB connections that all
recover on their own after a few minutes.
 
 Regards,
 Anthony
 
  Since this happen about once a month, do you happen to do massive
monthly deletes or updates, Anthony, and do the blocking occur after such
deletes/updates and before or during the next sweep? If so, a possible
solution could (in some cases), be to delete/update a bit every hour or day
rather than monthly.
  
  Set
 






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



RES: [firebird-support] Moving from 2 to 2.5?

2012-05-25 Thread Fabiano
Yes you can, but the best approach is create a backup with 2.x version then
restore in 2.5 to get the advantages of new ODS.

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Maury Markowitz
Enviada em: sexta-feira, 25 de maio de 2012 07:57
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] Moving from 2 to 2.5?

 

  

I would like to test the transition from 2.x to 2.5 on a backup machine we
have. Am I correct in believing I can simply move the data files over and
point the 2.5 server at them?

The only note I found on this was this:

http://www.firebirdnews.org/?p=5027

Which appears to detail problems in one particular file. But I can't tell
from context if this is a general issue or applies only to the USERs.





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



RES: [firebird-support] Re: Firebird classic multicore performance

2012-05-24 Thread Fabiano
This machine uses a dedicated controller for RAID or uses OS? - If using SO
it will slow down the whole system.

 

The RAID controller is with or without cache? - without cache is the same.



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



[firebird-support] Internal Firebird question.

2012-05-21 Thread Fabiano
Hi all.

I have a question about how Firebird internally updates a record.

 

Here an example:

Create table test(cod integer, name varchar(50))

Commit;

 

Insert into test(cod, name) values (1, 'Big description 1');

Insert into test(cod, name) values (2, 'Big description 2');

Insert into test(cod, name) values (3, 'Big description 3');

Commit;

 

Delete from teste where cod=2;

Commit;

 

At this point when I inspect the FDB with an hex editor I can see 3 record
on Page record (0x05).

There are 3 entries in the struct dpg_repeater. Two of them with offset
and length and one (for record cod=2) with both offset and length 0.

 

Whell, next I insert a new record:

Insert into test(cod, name) values (2, 'Small 2');

Commit;

 

After that I reinspect the FDB file and it not REUSE the old record that
contains Big description 2. It stays here and a NEW record was create to
hold the new record 2 that are SMALL than old record.

 

Why? Why Firebird does not reutilize that space?

I tested with only one connection in a test database with only this table.

Thanks, Fabiano.

 

 



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



RES: [firebird-support] Internal Firebird question.

2012-05-21 Thread Fabiano
Dmitry thanks for answers. I understand fine. 

But I made a new test:

After deleting cod=2, I make a backup with garbage collect set and do a
'select count(*) from  test' to ensure all rows are touched.

Then:

Insert into test(cod, name) values (2, 'Small 2');

 

Again, it does not reuse the old space. I try disconnect all, reconnect and
FB does not use old space.

I agree with you with my first test but with this I does not see why it does
not reuse space.

Many thanks!

 

 

  

Hello, Fabiano!

Monday, May 21, 2012, 9:08:04 PM, you wrote:

F I have a question about how Firebird internally updates a record.

it uses versioning.

F Insert into test(cod, name) values (1, 'Big description 1');
F Insert into test(cod, name) values (2, 'Big description 2');
F Insert into test(cod, name) values (3, 'Big description 3');

well, 3 records in table.

F Delete from teste where cod=2;

here engine created new version named as delete stub for one of the
records. It keeps old record because it can be still visible and
required for running snapshot transactions, even if they are not
exist now.

F Whell, next I insert a new record:
F Insert into test(cod, name) values (2, 'Small 2');

4-th record.

F After that I reinspect the FDB file and it not REUSE the old record that
F contains Big description 2. It stays here and a NEW record was create
to
F hold the new record 2 that are SMALL than old record.

yes. deleted or updated records are new versions, and old versions
can be considered garbage and removed from pages only when engine
will be sure that these old versions are not needed for any
running transactions.
Old versions will be cleared during select or update statement that
will touch this records.

F Why? Why Firebird does not reutilize that space?

see below.

F I tested with only one connection in a test database with only this
table.

versioning works always, there is no single-user mode in the
Firebird engine.
please read
http://www.firebirdsql.org/en/multi-version-concurrency-control/
http://en.wikipedia.org/wiki/Multiversion_concurrency_control
http://blogs.teamb.com/craigstuntz/2005/02/18/2699/

http://blogs.teamb.com/craigstuntz/2004/06/22/587/

etc.

-- 
Dmitry Kuzmenko, www.ib-aid.com





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



RES: RES: [firebird-support] Internal Firebird question.

2012-05-21 Thread Fabiano
Dmitry, I Just curious!

My application has a good transaction control and old record versions is not
a problem.

 

I read the this PDF  http://www.firebirdsql.org/manual/fb-internals.html
http://www.firebirdsql.org/manual/fb-internals.html 

and start making tests to see how this works. 

 

I already have read your site and both have lots of interesting information!

 

I think Firebird uses the best approach for deleted records but I don't
understand much why. In this aspect it is very different than Paradox that
rewrite the whole page without deleted records (if is not the first or last
record of the page). 

 

As Ann says it choose the easiest way =)



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



RES: [firebird-support] Internal Firebird question.

2012-05-21 Thread Fabiano
Thanks Ann. 

Really I think that it does not use free space very often because is not
ease of use as you say in topic 3.

I'm just curious!



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



RES: [firebird-support] How to return only a few rows from select sql statement

2012-01-20 Thread Fabiano
Try:

select first 5 * from table

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Milan Babuskov
Enviada em: sexta-feira, 20 de janeiro de 2012 09:40
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] How to return only a few rows from select
sql statement

 

  

trskopo wrote:
 Suppose I have a sql statement :
 select * from table
 
 Is that possible to return only a few rows from that statement (not the
whole result), just like MySQL?

http://www.firebirdfaq.org/faq111

HTH

-- 
Milan Babuskov

==
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==





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



RES: [firebird-support] Re: Optimizing Firebird for SSD

2011-12-21 Thread Fabiano
I mean: How to create a ram disc?

 

De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de karolbieniaszewski
Enviada em: quarta-feira, 21 de dezembro de 2011 04:34
Para: firebird-support@yahoogroups.com
Assunto: RES: [firebird-support] Re: Optimizing Firebird for SSD

 

  

Do you know what is RAM DISC?
If not then google for it ;-)

I can simple say that RAM DISC is some virtual disc created in RAM MEMORY.
After creation you use it as normal hard drive (copy database on it and use
as normal) with all benefits of RAM speed :)

but you must remember that if power failure or some hardware error occur and
your server stop - all data from RAM will be cleared.
Because of that you must do backup in some short interval.

e.g. your database is 3GB you can create RAM DISC 4GB and do backup to
normal HARD DISC or better you can create RAM DISC 8GB and do backup to also
RAM DISC and when backup process completed simple copy backup file to HARD
DISC what is tone faster.

RAM is now cheap - but i do not know what is your database size and what
scenario can be accomplished. 

--- In firebird-support@yahoogroups.com
mailto:firebird-support%40yahoogroups.com , Fabiano fabianoaspro@...
wrote:

 How put the entire database on RAM Disk?
 
 





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



RES: [firebird-support] Why this returns string truncate??

2011-12-13 Thread Fabiano
I use charset WIN_1252 for Portuguese characters. 

-Mensagem original-
De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Alexandre Benson Smith
Enviada em: terça-feira, 13 de dezembro de 2011 15:06
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] Why this returns string truncate??

Em 13/12/2011 09:32, Fabiano escreveu:
 I have this situation:



 CREATE TABLE TESTE (TXT  VARCHAR(100));



 insert into TESTE(TXT) values ('MECƒNICA');



 This simple select return “Arithmetic overflow or division by zero has
 occurred. Arithmetic exception, numeric overflow, or string truncation.
 String right truncation.”



 select UPPER(TXT) from  TESTE



 Tested with FB 2.5.1 and 2.5.0.

 Why it occurs?





Try to use charset ISO8859_1 or Win_1252





++

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







++

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/



[firebird-support] When I need to do a full backup/restore?

2011-11-19 Thread Fabiano
I have an application that run on 12/5 environment using firebird 2.5.1
I read MUCH about avoid firebird problems/corruptions by backup/restore the
Firebird database eventually. The best approach appears to be every day - in
my case at night when there's no one connected to database.

The problem is that I cannot force my clients to do not power off the server
during night! Then: There are a form/way/sql that I can run and check if I
REALLY need to do a backup/restore?

Sorry my very poor English.
Fabiano.



RES: [firebird-support] Re: problem creating trigger FB 1.5

2011-11-16 Thread Fabiano
I think this is a Bug corrected in Firebird 2.5.1!
I read something about it on release notes of FB 2.5.1
Sorry my poor english

-Mensagem original-
De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Bart Smissaert
Enviada em: quarta-feira, 16 de novembro de 2011 14:12
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] Re: problem creating trigger FB 1.5

Ignore this.
Have managed to create the triggers now and they are working fine.

RBS



On Wed, Nov 16, 2011 at 2:20 PM, Bart Smissaert
bart.smissa...@gmail.comwrote:

 This should work:

 CREATE TRIGGER EXTENDED_TEXT_ADD FOR EXTENDED_TEXT ACTIVE BEFORE
 INSERT POSITION 10 AS
 begin
  insert into audit_trail
  values (null, null, null, 45, 0,
  new.Extended_Text_Type| new.Foreign_Id|
 new.Extended_Text_Sequence_No,
  null,
  null
 );
 END

 But sofar not managed to do it via Database WB.
 If I do this with the trigger editor I can't set the trigger name to
 EXTENDED_TEXT_ADD
 and if I do with the SQL editor and run the statement as above I get:
 unsuccessful metadata update DEFINE TRIGGER failed attempt to store
 duplicate value
 (visible to active transactions) in unique index RDB$INDEX_8.
 Trigger editor allows me to create the trigger, but the trigger name then
 will be
 EXTENDED_TEXT_
 How to set the trigger name?

 Any suggestions?

 RBS



 On Wed, Nov 16, 2011 at 9:27 AM, Bart Smissaert
bart.smissa...@gmail.comwrote:

 I don't know those values.
 Not sure now how they are inserted, audit_id will be via a generator.

 RBS



 On Wed, Nov 16, 2011 at 9:15 AM, Thomas Steinmaurer
t...@iblogmanager.comwrote:

 **


  Actually, I suppose I could do:
 
  CREATE TRIGGER EXTENDED_TEXT_DEL FOR EXTENDED_TEXT
  ACTIVE BEFORE DELETE
  POSITION 10
  AS
  begin
  insert into audit_trail
  values (null, null, null, 45, 1,
  old.Extended_Text_Type|
  old.Foreign_Id|
  old.Extended_Text_Sequence_No,
  old.Extended_Text_Type|
  old.Foreign_Id|
  old.Extended_Text_Sequence_No|
  old.Free_Text, null
  );
  END
 
  replacing the missing fields with null.
  Should that work?

 Why not providing real values if you know them instead of null?


 --
 With regards,
 Thomas Steinmaurer

 * Upscene Productions - Database Tools for Developers
 http://www.upscene.com/

 * My Blog
 http://blog.upscene.com/thomas/index.php

 * Firebird Foundation Committee Member
 http://www.firebirdsql.org/en/firebird-foundation/

 






[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





[firebird-support] Very poor insert performance

2011-10-19 Thread Fabiano
Hi all,

I had to insert 300.000 records in a table with no indices or triggers except 
the primary key, which is type char(16), character set octets.

With the primary key, it took 40 minutes to insert all records.

Removing the primary key, it took 1m40s to insert all records.

Both tests were done using a just restored database, forced-writes off, 
firebird 2.5, and the same machine.

Is this difference expected? Maybe it is related to the type of the primary key?

Is there something i can do to improve the performance?

Regards,

Fabiano



[firebird-support] Re: Very poor insert performance (with UUID primary keys)

2011-10-19 Thread Fabiano
Hi again,

I created a test case which shows the problem, using a new database.

Firebird CS 2.5.1 running on Windows 7, default firebird.conf.

Time to insert 200.000 records in a single-field table:

/*
 * Integer field, no PK
 */
create table t1 (
  id integer not null);

set term !! ;
execute block
as
  declare variable i integer;
begin
  i = 0;
  while (i  20) do
  begin
insert into t1 values (:i);
i = i + 1;
  end
end !!
set term ; !!

TIME: 2s199ms

/*
 * Integer field, with PK
 */
create table t2 (
  id integer not null);

alter table t2
  add constraint pkt2 primary key (id);

set term !! ;
execute block
as
  declare variable i integer;
begin
  i = 0;
  while (i  20) do
  begin
insert into t2 values (:i);
i = i + 1;
  end
end !!
set term ; !!

TIME: 3s869ms

/*
 * UUID field, no PK
 */
create table t3 (
  id char(16) character set octets not null);

set term !! ;
execute block
as
  declare variable i integer;
begin
  i = 0;
  while (i  20) do
  begin
insert into t3 values (gen_uuid());
i = i + 1;
  end
end !!
set term ; !!

TIME: 2s542ms

/*
 * UUID field, with PK
 */
create table t4 (
  id char(16) character set octets not null);

alter table t4
  add constraint pkt4 primary key (id);

set term !! ;
execute block
as
  declare variable i integer;
begin
  i = 0;
  while (i  20) do
  begin
insert into t4 values (gen_uuid());
i = i + 1;
  end
end !!
set term ; !!

TIME: 1m53s587ms ---

I created a new database and ran the last test again:

TIME: 4m00s881ms ---

Regards,

Fabiano



  1   2   >