I have a $5,000,000 budget.
And I have a list of projects with known costs.
I want to use up as much of the projects' budget as is practical--but with minimal complexity.
Using database logic, I can generate an ascending running total column in the list of projects. Using the running total, I can successfully omit any projects where the running total is greater than $5,000,000.
In order to reach my goal of using up most of the budget, I have come up with a low-tech technique where I sort the construction projects descending so that the more expensive projects are at the top of the list (and the less expensive projects are at the bottom). This way, when the running total of the projects approaches the $5,000,000 cut-off, I'm left with smaller projects that fit fairly well into the remaining gap.
This technique seems to be fairly successful. While it doesn't achieve 100% optimization, it does have the benefit of being low in complexity.
Question:
What is this kind of optimization called?
The general case you are looking for is commonly called the Knapsack problem. There is no general, efficient way to optimally solve it so your idea of trying to use the most expensive projects first so you have a large selection of less expensive ones to try to fill in most, if not all, of the remaining gap is a quite good, relatively efficient, heuristic way to handle this.
As Henry pointed out, what you propose is a "greedy" type algorithm that, according to the Wikipedia article, was proposed previously by George Dantzig. However, there doesn't seem to be any specific name associated with this. Nonetheless, if you search on & read about the Knapsack problem, you may be able to find other relatively simple & fast techniques you can try using.