From the article "FirebirdSQL: internal files, temporary files, and environment variables" you know that location of the Firebird temporary files is governed by the environment variable FIREBIRD_TMP.
If you see that default location for temporary files has lack of space, or if it is situated on the slow drive, you can try to change the path to the temporary Firebird files. For this you need to define FIREBIRD_TMP with the new path.