1. A method for querying a database with on demand database query reduction, comprising: receiving a query document with global variables selectively set off by first tags identifying a first global variable as a complete replacement variable and by second tags identifying a second global variable as a complete removal string; and building from said query document an expanded query by replacing any variables set off by said first tags with runtime strings, setting off any unions in said query document, and selectively replacing any variables set off by said second tags and removing said second tags without replacing variables set off by said second tags.