Subject Re: [firebird-support] Re: Sort Error -- Not enough memory
Author Helen Borrie
At 04:22 PM 8/12/2004 +0000, you wrote:


>Btw, the sort_mem_error is with 1.0.3. It was a database with a
>million records and the user was sorting on a column with very low
>selectivity.
>
>The main thing that I found strange was that the server only grew to
>~64 megs in memory before giving this exception. Is there a limit here
>I need to increase?

I didn't see the original message, but...

Fb 1 uses temporary sort space on disk for storing the intermediate sets
during sorts. If you haven't configured any sort space, it will use the
default TEMP or /tmp directory on your system. Since the TEMP (or TMP)
directory on some people's systems often full of ancient garbage, it's
common for sort space to run out if you overlook this detail.

In ibconfig, you can configure one or more disk locations around the system
for Firebird to use. The parameter is tmp_directory. Use one entry for
each space you want to allocate (of course, create these directories first!!):

tmp_directory 6000000 "d:\fbtemp"
tmp_directory 12000000 "f:\fbtemp"
tmp_directory 4000000 "w:\backwash"

Note the double quotes!!

>You wrote:
> > I'm getting a 335544676 GDS exception. This is with 1.0.3 running on
> > Windows. Oddly enough, the ibserver process was only using 64 megs of
> > memory. Any ideas on how to increase this value? The only property I
> > have set in ibconfig is this:
> >
> > DATABASE_CACHE_PAGES 9000

Page cache isn't used for sorts. Fb 1.0 doesn't use memory for sorts. From
v.1.5 onward, you can reconfigure sort space in memory.

./hb