Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how much disk space is enough?

Status
Not open for further replies.

gguidarelli

Programmer
Jul 23, 2002
11
0
0
US
In earlier versions of Foxpro, I remember the documentation said something like this: "to be safe, the amount of free disk space you'll need for temp tables created during SQL queries is about 2 to 3 times the total amount of disk space your database takes up."

Assuming I remembered that right, is this still true for VFP 7? I haven't been able to find any reference to this.

Thanks in advance.
Greg
 
I think that Microsoft doesn't bother adding any of that sort of info any more since disk space isn't at such a premium anymore. Not like it was when it was $10 per meg. The table size limit is still 2 gig, and not that many 2 gig tables reside on 4, 6 or even 10 gig drives nowdays.
But you are still right. Allow at least 2 or 3 times the actual file size for temp/swap files when running queries or indexes.
Dave S.
[cheers]
 
Greg,
While I've seen the numbers you talk about for doing a SORT or even a PACK - for a Query, I don't believe you'd need that much space. Normally a query is a subset of both the total fields AND the total records, so it should normally only require more space if you selected (almost) all of them AND you ordered the results on an expression not in one of the current indexes.

Rick
 
Thanks a lot guys for taking the time to reply.

Found something on MS website. Though it says it applies to VFP3, I can only assume it's still applicable to VFP7:

It says, regarding sorts done within an SQL: "temporary files are used while performing a sort if the entire sort cannot be performed in memory. The size of the temporary sort files for a given sort should be no larger than:
(record length + key length) * (number of records) * 2"

Maybe MS is being cautious, telling us to have more space than what's really needed(?).

Our databases usually are in the 100s of MB. So, when we tell our clients about disk requirements, we just want to protect ourselves from giving them too low a number and finding out later it wasn't enough. Plus, while the server may have plenty of room, those temp files (I believe, unless told otherwise) will be created on client's local drive. I have 10MB free on my c: drive :( Anyway... I guess we'll be cautious too and stick with the 2-3 times table size.

Thanks again for your responses.
 
gguidarelli:

To expand on the above, from VFP Help:

SORTWORK path
Specifies where commands such as SORT and INDEX should place work files. Because work files can become up to twice as large as the tables being sorted, specify a location with plenty of free space. For faster performance, especially in a multiuser environment, specify a fast disk (such as a local disk). Default is the startup directory.

Al
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top