Subject Re: Sort error
Author vandy899
--- In firebird-support@yahoogroups.com, "Robert DiFalco"
<rdifalco@t...> wrote:
> Vers: FB 1.0.3 Windows
>
> We were having problems with some queries running out of sort space, so
> we began setting the TMP_DIRECTORY variable in the ibconfig file like
> so:
>
> TMP_DIRECTORY 5368709120 "C:\Program
> Files\Tripwire\TE\Server\tmp\firebird"
>
> When we do that however, we get the following error:
>
> org.firebirdsql.jdbc.FBSQLException: GDS Exception.335544676. sort
> error: not enough memory
>
> Unsetting the variable allows the latter query to complete but once
> again breaks the earlier queries. In either case the temporary files
> created during the query add up to around 750 megabytes of space, the
> only difference seems to be where the sort files are created. Why would
> setting this variable lead to an out of memory error?
>
> Also, note that there is plenty of disk space to accommodate the
> TMP_DIRECTORY setting.

Correct me if I'm wrong, but it looks to me like that might overflow a
32-bit integer (I am no developer on firebird, but am a (C)
programmer. What that would look to me like is that the amount of
temp space is stored in a 32-bit integer. Try it first with an amount
below 2^32, then with an amount below 2^31.

Else wait for someone that knows what they're doing :)

Cheers,

Michael