If you throw enough men and money at the border, you could stop every thing. The question is how many and how much.
There is a law of diminishing returns.
You can read the bill. If the assigned military can't arrest, search, etc, what will they be doing and who will be doing the arresting and searching.
As the bill states, there is a fine line on posse comitatus.
It's not going to take millions of troops, their presence alone will be a deterrent to would be illegals, drug smugglers and terrorists. We'll always need a civilian force and hopefully as their ranks increase the military can be taken off.