Re: [firebird-support] Re: tempdirectories

2018-07-30 Thread Helen Borrie hele...@iinet.net.au [firebird-support]
wobble...@yahoo.co.uk,

> is there a good and up to date official source of documentation on
> firebird.conf

The firebird.conf file itself, version current for the Fb version you
are using.  You won't get more up to date than that anywhere.
For Fb3, which allows per-database config for a lot of
parameters, see the release notes.  Some things are (or can be)
configured at the client side via a config file now, too.

> and other admin?

What's "other admin"?  The command-line tools are all documented but
some could do with updating, admittedly.  You can catch up with any
new switches in those apps by running them with the -? switch.

Vol. 3 of TFB2e covers them all in more detail, up to the earlier
releases of Fb 2.5, but it's not free.

HB




---
This email has been checked for viruses by AVG.
https://www.avg.com



Re: [firebird-support] Re: tempdirectories

2018-07-30 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
30.07.2018 12:01, wobble...@yahoo.co.uk [firebird-support] wrote:
> is there a good and up to date official source of documentation on 
> firebird.conf and other 
> admin?

   Description of firebird.conf is inside of it.


-- 
   WBR, SD.






++

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

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

++


Yahoo Groups Links

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



[firebird-support] Re: tempdirectories

2018-07-30 Thread wobble...@yahoo.co.uk [firebird-support]
is there a good and up to date official source of documentation on 
firebird.conf and other admin? I can't find anything in the 
https://www.firebirdsql.org/en/reference-manuals/ 
https://www.firebirdsql.org/en/reference-manuals/ that is as good as the older 
release notes, nor the janus software document.  

 This https://www.firebirdsql.org/pdfmanual/html/qsg25-config.html 
https://www.firebirdsql.org/pdfmanual/html/qsg25-config.html list some 
configuration details, but I can see it hasn't got all of firebird.conf's 
options.

 

 (by "I can't find" I obviously mean that google can't find!)



Re: [firebird-support] Re: tempdirectories

2018-07-30 Thread Helen Borrie hele...@iinet.net.au [firebird-support]
Ian wrote:

> We got the idea from The Firebird Book, and after that I can't find
> mention of it being deprecated in 2.0 release notes or later.

Not deprecated but abolished. If something is "deprecated", it is
still valid but likely to be dropped in a subsequent release.  From Fb
2 onward, Fb was made more tolerant of directory names with spaces,
hence the need to drop such embellishments.

(Not that made anything like sufficientt impact on my consciousness in
2013-4 to remember it affected TempDirectories - q.v.)

> From
> the 2004 book, page 745 (I know it's older than my daughter ;-):


> "TempDirectories


> Version 1.5 forward


> Supply a list of one or more directories, separated by semicolons
> (;), under which sort files may be stored. Each item may include an
> optional size argument. in bytes, to limit its storage.


> TempDirectories = userdata\sortfiles 500
> "

It has subsequently become a myth that has survived into TFB Second
Edition. I can fix that.

> And also in the 1.5.6 release notes
> https://firebirdsql.org/rlsnotesh/config-fb-conf.html, and then
> hanging around in something that claims to be the Firebird 2
> Administrators manual, but now I look closer it isn't obvi  ously a
> core fb site:
> http://www.janus-software.com/fbmanual/manual.php?book=admin=42

No, it's not.


> I can't find it mentioned anywhere else though, except in things
> like http://tracker.firebirdsql.org/browse/CORE-2151 where the author was 
> still using it...

The author of that ticket was the developer who wrote the parser code.
;-)  It looks as though he'd discovered unintended behaviour when the
parser landed on a space in a directory name...the older code to
truncate out anything following a space (i.e., assumed to be the
now-invalid allocation size) was gaily truncating forward from the
first space in the directory name itself. (That was an amazing piece
of searching that dug that up!)

Helen





---
This email has been checked for viruses by AVG.
https://www.avg.com



Re: [firebird-support] Re: tempdirectories

2018-07-28 Thread Helen Borrie hele...@iinet.net.au [firebird-support]

> 27.07.2018 21:41, Helen Borrie hele...@iinet.net.au [firebird-support] wrote:
>> I don't know where you got the idea that you could specify the size of
>> a temp directory.

Dmitry replied

>It is an Interbase feature.

Uh...ok... @_@

If you want to allocate specific spaces for your temp directories on
the hard disks, just create a couple of partitions of the sizes you
had in mind.

Helen


---
This email has been checked for viruses by AVG.
https://www.avg.com



Re: [firebird-support] Re: tempdirectories

2018-07-27 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
27.07.2018 21:41, Helen Borrie hele...@iinet.net.au [firebird-support] wrote:
> I don't know where you got the idea that you could specify the size of
> a temp directory.

   It is an Interbase feature.


-- 
   WBR, SD.






++

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

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

++


Yahoo Groups Links

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

<*> Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [firebird-support] Re: tempdirectories

2018-07-27 Thread Helen Borrie hele...@iinet.net.au [firebird-support]
wobble...@yahoo.co.uk wrote:


> I've just tried 


> TempDirectories = /location1 5000 ;/location2  ; /location3


> And location1 is ignored, but 2 and 3 used!

Which tells you something. ;-)
The engine doesn't recognise the format of the first member of the
list but it's OK with the second and third because they are legal.

I don't know where you got the idea that you could specify the size of
a temp directory.  It's never been a thing and it wouldn't make
sense if it were.  The idea of being able to specify multiple
locations is that you can avoid an out-of-space crash if the engine
has somewehere else to go when it needs to put temp files to disk and
the first (or default) temp space is used up.  Another point is that,
if your user environment has a lot of users doing lots of ordered
queries and keeping them alive for long periods, you can consider
having a dedicated disk, such as a fast SSD, for TempDirectories.

The engine holds the temp file structures in RAM if it can: it only
puts them to disk if available RAM is too low.  Hence, allocating a
RAM disk for TempDirectories doesn't make sense, either.

Helen


---
This email has been checked for viruses by AVG.
https://www.avg.com



[firebird-support] Re: tempdirectories

2018-07-27 Thread wobble...@yahoo.co.uk [firebird-support]
I've just tried  

 TempDirectories = /location1 5000 ;/location2  ; /location3
 

 And location1 is ignored, but 2 and 3 used!
 

 



Re: [firebird-support] Re: TempDirectories and ALTER INDEX ACTIVE

2012-06-10 Thread Mark Rotteveel
On 8-6-2012 18:07, Ann Harrison wrote:
 On Fri, Jun 8, 2012 at 11:24 AM, Alec Swan alecs...@gmail.com wrote:

 Thanks Vlad, but this is too complicated to give as a guidance to our
 customers. However, it sounds like rebuilding an index cannot require more
 space that the database size itself, right?


 On a bad day, yes it could.  To have a day that bad, you'd have to have
 keys that are most of the size of the record, with columns that are often
 null, zero, or contain values much smaller than the declared size of the
 column.  There may be a situation during the merge phase of the sort when
 there's more than one copy of each record.

Question out of curiosity: why does an index rebuild actually require a 
sort? I would think that for an index rebuild this would be sufficient:

* deactivate index
* clear index
* for each record (sequential read of all pages?)
*insert column value into index
* activate index

These steps would not require any additional temporary space.
-- 
Mark Rotteveel




Re: [firebird-support] Re: TempDirectories and ALTER INDEX ACTIVE

2012-06-10 Thread Mark Rotteveel
On 10-6-2012 12:32, Dmitry Yemanov wrote:
 10.06.2012 14:09, Mark Rotteveel wrote:

 * for each record (sequential read of all pages?)
 * insert column value into index

 Inserting unsorted / random values into the b-tree is known to be much
 slower than sorting the values in advance and loading them into the
 b-tree in order.

If the trade off is requiring a large part of memory or disk space extra 
(and the additional time required to perform the sort), then I do wonder 
if the advantage is really that big.

The build of a balanced b-tree(*) is O(n log n), and the 'good' case of 
sorting is O(n log n) to O(n^2) (ideal is O(n)). Sorting before 
insertion might only be worth the effort if the sort can fully occur in 
memory. The additional overhead of writing to disk during the sort and 
reading from disk for insertion might negate most of the advantages 
against the overhead of inserting into the b-tree unsorted (ie balancing 
etc).

It might be worth to investigate this tradeoff, or just to provide an 
option to rebuild indices without using temporary sort spaces so others 
can measure it for themselves (or to have a workaround if disk space is 
not large enough to accommodate the rebuild).

*) I am assuming FB uses a balanced trees, because sorting first would 
otherwise degenerate it into a linked list
-- 
Mark Rotteveel




Re: [firebird-support] Re: TempDirectories and ALTER INDEX ACTIVE

2012-06-08 Thread Alec Swan
Thanks Vlad, but this is too complicated to give as a guidance to our
customers. However, it sounds like rebuilding an index cannot require more
space that the database size itself, right?

On Fri, Jun 8, 2012 at 7:22 AM, hvlad hv...@users.sourceforge.net wrote:

 **




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

  My main question is how can we calculate the temp sort space required
  to ALTER INDEX ACTIVE (on all indexes serially) given the size of the
  database? Is twice the size of the database a good upper bound?

 Enumerate all fields in index, calculate summa of full size of every
 field (for [var]char(N) it is N * bytes_per_char, for ex.), add extra 8
 bytes (for record number) - this is sort record size.
 Multiply it by number of records and you'll get a lower estimate of
 temp space required. Substract value of TempCacheLimit and you'll get
 estimate of disk space required.

 Regards,
 Vlad

  



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





++

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

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

++
Yahoo! Groups Links

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

* Your email settings:
Individual Email | Traditional

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

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

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

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [firebird-support] Re: TempDirectories and ALTER INDEX ACTIVE

2012-06-08 Thread Ann Harrison
On Fri, Jun 8, 2012 at 11:24 AM, Alec Swan alecs...@gmail.com wrote:

 Thanks Vlad, but this is too complicated to give as a guidance to our
 customers. However, it sounds like rebuilding an index cannot require more
 space that the database size itself, right?


On a bad day, yes it could.  To have a day that bad, you'd have to have
keys that are most of the size of the record, with columns that are often
null, zero, or contain values much smaller than the declared size of the
column.  There may be a situation during the merge phase of the sort when
there's more than one copy of each record.

Good luck,

Ann


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



RE: [firebird-support] Re: TempDirectories and ALTER INDEX ACTIVE

2012-06-08 Thread Leyne, Sean
Alex,

 However, it sounds like rebuilding an index cannot require more
 space that the database size itself, right?

Correct, in order to build the index, the engine must build and sort a 
projection of the index values.

So, if you build an index on a string [say varchar(100)] column which is only 
sparsely populated (avg usage = 10 char) then it is reasonable/expected that 
the index will be much larger than the war data storage.


Sean