Re: [firebird-support] Is it save to append some data at end of the binary firebird database file?
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
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
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
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
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)
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
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
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
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
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.
---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.
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
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 ...
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 ...
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] Have a lots memory, but FB could not take advantages
Just increase Page Buffers [Non-text portions of this message have been removed]
[firebird-support] Fluxo do software
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
Sorry about that! I posted on wrong place... [Non-text portions of this message have been removed]
RES: [firebird-support] RDB$PAGES
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
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
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?
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?
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]