Re: unable to execute query as it's unable write to temporary file
Posted in 2005
dan.tofan@gmail.com wrote:
> I'm running Informix 7.31 TD2 on win xp and I'm trying to run a select
> and I get the following error:
>
> 264: Could not write to a temporary file.
> 131: ISAM error: no free disk space
The problem is that your query needed more space to sort than it could get
in memory so it tried to push sort-work files to disk and did not have
enough room. Sorts in IDS write sort-work files into any temp type dbspaces
(-t flag added to onspaces when the dbspace is created) listed in
DBSPACETEMP environment variable (either the user's copy or the servers if
not present). If there is no DBSPACETEMP or no temp dbspaces then rootdbs
is used and your rootdb space only have 1175 pages left free. Looks like
the sort was just bigger than that. You can create a temp dbspace and set
DBSPACETEMP to use that for sorting. Another alternative is to enable the
parallel sort module by setting PSORT_NPROCS=<# sort threads to use> and
PSORT_DBTEMP to a list of 3-6 filesystems (not dbspaces!) each of which has
enough room for a copy of the sorted data (guess). The parallel sort
package can use filesystem space for sort-work files instead of dbspaces.
Art S. Kagel
> The /tmp is set on %USERPROFILE%\\Local Settings\\Temp dir and I have
> more than 2g of free disk space on that drive.
> I have no tempdbs setup.
>
> Here's the onstat -d:
>
> Informix Dynamic Server Version 7.31.TD2 -- On-Line -- Up 01:52:22
> -- 430912 Kbytes
>
> Dbspaces
> address number flags fchunk nchunks flags owner name
> 25d1c150 1 1 1 1 N informix rootdbs
> 25d1c950 2 1 2 6 N informix
> ol_dantop
> 2 active, 2047 maximum
>
> Chunks
> address chk/dbs offset size free bpages flags pathname
> 25d1c210 1 1 0 7680 1175 PO-
> C:\\IFMXDATA\\ol_dantop\\rootdbs_dat.000
> 25d1c380 2 2 0 512000 1 PO-
> C:\\IFMXDATA\\ol_dantop\\ol_dantop_dat.000
> 25d1c478 3 2 0 500000 1 PO-
> d:\\informix\\ol_dantop_dat.001
> 25d1c570 4 2 0 125000 3 PO-
> d:\\informix\\rootdbs_dat.001
> 25d1c668 5 2 0 500000 1029 PO-
> \\\\danpiv\\chunk\\ol_dantop_dat.003
> 25d1c760 6 2 0 500000 499997 PO-
> \\\\danpiv\\chunk\\ol_dantop_dat.002
> 25d1c858 7 2 0 250000 249997 PO-
> \\\\danpiv\\chunk\\rootdbs_dat.002
> 7 active, 2047 maximum
>
> It has space in rootdbs so what else should I check for?
> Thanks!
>