Re: Odp: [firebird-support] RE: MON$IO_STATS -gt; M ON$PAGE_FETCHES - wrong values or as designed?

2013-12-13 Thread Tim Ward

In case this helps anyone else ...

For x records it's usual to see 2x fetches. If this creeps up to 3x 
fetches and your application slows down by several orders of magnitude 
it may be that you have fragmented records, with each record split 
across two or more pages.


On 12/12/2013 14:59, liviusliv...@poczta.onet.pl wrote:


Hi,

Thanks you very much i see that i misunderstand fetches fetchesield 
previously. Now it is clear - for 59732 records it is possible to have 
120637 fetches :)


Regards,
Karol Bieniaszewski



--
Tim Ward



[firebird-support] RE: Server setup advice

2013-12-13 Thread mariuz
Classic server it might help on robustness : each connection will be isolated 
(where a crashing server doesn't take down the other connections and it will 
use more resources ) , but for scaling it uses the same  architecture as 
SuperClassic (no shared cache) so cpus are used the same way 
 

 
http://www.sinatica.com/blog/en/index.php/articles/firebird-superserver-classicserver-or-superclassic
 
http://www.sinatica.com/blog/en/index.php/articles/firebird-superserver-classicserver-or-superclassic

 http://mapopa.blogspot.ro/2010/05/what-to-choose-from-fourth-firebird.html 
http://mapopa.blogspot.ro/2010/05/what-to-choose-from-fourth-firebird.html

 

 also we need more details , io/memory/cpu stats , also firebird stats and logs 
with actual errors 


Re: [firebird-support] Replication of Firebird Databases (meany to one)

2013-12-13 Thread Tupy . . . nambá
Andy,
The way to know if a DB is accessible (online, and if the customer network can 
reach you - can not be interconnected networks) is to make a small application 
with a connection and attempting to connect.

With VB6, at this link, you have an explanation of how to do such application.
http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/352387/how-to-create-a-connection-with-adodb

There you see you can do it easily, may be stil not using ODBC. But, if by any 
reason, you prefer it, change the connection string for using an ODBC driver. 
With VB6, you have an connection builder, that can build it for you in both 
ways, with/out ODBC.

Good luck,
Roberto Camargo.



On Saturday, December 7, 2013 6:24 AM, marcus mar...@antiphasis.net wrote:
 
Hej all,

Andrew Gable wrote:
 Hi all,

 Does anyone know any good free to use replication software.

 What i have is as follows

 I have 4-20 terminals with a database that holds all the products/
 cashier ids etc in it and I want the system to sync the local database

 to it the server and then delete any data that his has processed

 can this be done with Replication or do I need to create my own app to
 handle this
Sorry, could't resist: first answers @ google when searching for 
firebird replication
http://www.firebirdsql.org/en/some-solutions-to-old-problems/
http://www.firebirdfaq.org/faq249/
http://www.symmetricds.org/
http://www.ibphoenix.com/download/tools/replication

IIRC, Holger Klemt (ibexpert.net) has written an article about how to 
build your own replication some few years (~2005?) ago in a german 
developer magazin.

There are several show stoppers buried in the database layout, such as 
ids, primary and foreign keys, unique values, generators and triggers.



 Also does anyone know anyway of checking to see if the server is online
 before connection to it in VB6 (via ODBC Driver)
You will have no luck accessing the firebird services API via ODBC, as 
ODBC is data only.

One option would be to work with something like try-catch(-finally). I 
don't know if that feature is available in VB6

Feel free to take a look at:
- http://pythonhosted.org/fdb/usage-guide.html#working-with-services
Even if not programming in python, it declares a lot about how to attach 
to a service.



 thanks

 Andy

hth, Marcus




++

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

    (Yahoo! ID required)


    http://info.yahoo.com/legal/us/yahoo/utos/terms/

[firebird-support] FreeAdhocUDF: file functions - can not SAVE#92;LOAD blobs with unicode paths.

2013-12-13 Thread brucedickinson
Hi guys,

have anyone tried these functions? I can save and load ascii named blobs to 
disk but it does not work for unicode paths. For example:

SELECT F_BLOBLOAD('E:\你好.txt') FROM RDB$DATABASE gives me an empty blob. 

I can not test it via FlameRobin because it is not able to properly create a 
query with unicode characters in it.

I've tested it with Firebird Maestro but I got nothing (empty blob). The same 
with Delphi.

It is very frustrating because I do not know where the problem lies:

1. Is CSTRING type a UTF-8 based type? It is required as an input path 
parameter.
2. Does Database character set can influence this? I've tried setup with NONE 
and UTF-8, nothing changes.
3. Perhaps those functions are not working with UTF-8 paths, but on the website 
it is written that they are UTF-8 compatibile (whatever that means?)
4. Perhaps everything is working fine but SQL Maestro is not sendingdata in 
valid text format, the same goes for Delphi.

I lot of ifs, maybe someone has some experience with this? Thank you.

Re: [firebird-support] FreeAdhocUDF: file functions - can not SAVE#92;LOAD blobs with unicode paths.

2013-12-13 Thread marcus
Hej,

brucedickin...@wp.pl wrote:
 Hi guys,

 have anyone tried these functions? I can save and load ascii named blobs
 to disk but it does not work for unicode paths. For example:

 SELECT F_BLOBLOAD('E:\你好.txt') FROM RDB$DATABASE gives me an empty blob.

 I can not test it via FlameRobin because it is not able to properly
 create a query with unicode characters in it.

 I've tested it with Firebird Maestro but I got nothing (empty blob). The
 same with Delphi.

 It is very frustrating because I do not know where the problem lies:

 1. Is CSTRING type a UTF-8 based type? It is required as an input path
 parameter.
 2. Does Database character set can influence this? I've tried setup with
 NONE and UTF-8, nothing changes.
 3. Perhaps those functions are not working with UTF-8 paths, but on the
 website it is written that they are UTF-8 compatibile (whatever that means?)
 4. Perhaps everything is working fine but SQL Maestro is not sendingdata
 in valid text format, the same goes for Delphi.

 I lot of ifs, maybe someone has some experience with this? Thank you.

Probably the wrong list?
They have a own mailing list: http://freeadhocudf.org/mailing_eng.html


RE: [firebird-support] FreeAdhocUDF: file functions - can not SAVE#92;LOAD blobs with unicode paths.

2013-12-13 Thread Wodzu
Their mailing list is not working. Which is not a surprise because the last 
version of UDF is from 2009…

 

Regards.

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] On Behalf Of marcus
Sent: Friday, December 13, 2013 3:46 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] FreeAdhocUDF: file functions - can not 
SAVE\LOAD blobs with unicode paths.

 

  

Hej,

 mailto:brucedickin...@wp.pl brucedickin...@wp.pl wrote:
 Hi guys,

 have anyone tried these functions? I can save and load ascii named blobs
 to disk but it does not work for unicode paths. For example:

 SELECT F_BLOBLOAD('E:\你好.txt') FROM RDB$DATABASE gives me an empty blob.

 I can not test it via FlameRobin because it is not able to properly
 create a query with unicode characters in it.

 I've tested it with Firebird Maestro but I got nothing (empty blob). The
 same with Delphi.

 It is very frustrating because I do not know where the problem lies:

 1. Is CSTRING type a UTF-8 based type? It is required as an input path
 parameter.
 2. Does Database character set can influence this? I've tried setup with
 NONE and UTF-8, nothing changes.
 3. Perhaps those functions are not working with UTF-8 paths, but on the
 website it is written that they are UTF-8 compatibile (whatever that means?)
 4. Perhaps everything is working fine but SQL Maestro is not sendingdata
 in valid text format, the same goes for Delphi.

 I lot of ifs, maybe someone has some experience with this? Thank you.

Probably the wrong list?
They have a own mailing list:  http://freeadhocudf.org/mailing_eng.html 
http://freeadhocudf.org/mailing_eng.html





Re: Odp: [firebird-support] RE: MON$IO_STATS -gt; M ON$PAGE_FETCHES - wrong values or as designed?

2013-12-13 Thread Ann Harrison
On Fri, Dec 13, 2013 at 4:15 AM, Tim Ward t...@telensa.com wrote:




 For x records it's usual to see 2x fetches. If this creeps up to 3x
 fetches and your application slows down by several orders of magnitude it
 may be that you have fragmented records, with each record split across two
 or more pages.


The reason for 2x fetches is that Firebird identifies a record through a
slot in a vector on the data page - both the page and the slot are part of
the RDB$DB_KEY.   The page is identified indirectly through an index of
pages for the table.  The values in the vector on the data page are the
length of the stored record and the offset on the page of the first byte of
the record.  So once a data page is in memory, Firebird reads the records
on it first by looking p the offset and length, then by reading that length
from that offset.  Even for a natural scan, Firebird has some overhead
fetches - first to find the right page in the index of data pages for the
table, then to access that page to read page numbers.  Indexed access
requires more fetches...

Fragmented records increase the number of fetches - and possibly the much
more expensive physical reads -  as do old record versions.

Good luck,

Ann


Re: Odp: [firebird-support] RE: MON$IO_STATS -gt; M ON$PAGE_FETCHES - wrong values or as designed?

2013-12-13 Thread W O
Good explanation Ann, it's very clear now.

Greetings.

Walter.



On Fri, Dec 13, 2013 at 3:58 PM, Ann Harrison aharri...@ibphoenix.comwrote:



 On Fri, Dec 13, 2013 at 4:15 AM, Tim Ward t...@telensa.com wrote:




 For x records it's usual to see 2x fetches. If this creeps up to 3x
 fetches and your application slows down by several orders of magnitude it
 may be that you have fragmented records, with each record split across two
 or more pages.


 The reason for 2x fetches is that Firebird identifies a record through a
 slot in a vector on the data page - both the page and the slot are part of
 the RDB$DB_KEY.   The page is identified indirectly through an index of
 pages for the table.  The values in the vector on the data page are the
 length of the stored record and the offset on the page of the first byte of
 the record.  So once a data page is in memory, Firebird reads the records
 on it first by looking p the offset and length, then by reading that length
 from that offset.  Even for a natural scan, Firebird has some overhead
 fetches - first to find the right page in the index of data pages for the
 table, then to access that page to read page numbers.  Indexed access
 requires more fetches...

 Fragmented records increase the number of fetches - and possibly the much
 more expensive physical reads -  as do old record versions.

 Good luck,

 Ann