Well, this depends on the structure of your application. If in a given page-load you'll only really need one or two of several hundred variables, then benchmark testing might show that querying the database might be quicker than including a massive configuration file. However, you'll need to be wary of bogging down your database with too many queries every time the user wants to do anything. Caching can cut down on the overhead added by redundant requests, but that's the extent of its use.
If these variables are mostly short strings or boolean flags, I think that your answer will largely rest on what you'll be able to maintain well. A well-structured .ini file would be easier to maintain than a big database if those variables rarely change and are always changed by hand. If these variables are changing constantly and never by hand, you'd probably be smarter to just load all of the variables into a database.
Personally, I've found myself in both situations and I've used both methods accordingly. If you're really indecisive, you can always just do some benchmark tests. Time a page load that pulls config information from the database, then time a page load using a .ini file (or a .php file full of define()
s).
(And pedantically speaking, define()
creates constants in the global scope, not global variables.)