Here's how it works. Out of the box templates are stored in the database. When you allow the template "to be saved as a file" it also copies the template to a location of your choice as a .html file.
Personally I use this all the time as then you can get your templates under version control, refactor them to a controlled directory ect. Not to mention the easiness of writing templates with your chosen IDE, rather than via the EE (In your face) interface.
When you are saving templates as files, and you change a template file externally from EE, EE will load the template from the database or file depending on which is most recent (see Saving templates as text files for full details), until you syncronise your templates (
Design > Templates > Syncronise Templates). This screen exposes and compares the template last save with the file last save and allows you to update DB templates with the latest file.
This way, if you turn 'Save Template Revisions' (
Design > Templates > Global Preferences) you can use that tool to go back through saved DB templates, update via the file, sync (causes a new entry in the DB), continue to roll back or proceed as required.
So, in summary by trying to drive 2 EE sites from one database the answer is yes, pushing a template to the dev box will cause the Database to syncronise eventually, making the template available on the live server. You're best bet is to seperate the databases. It seems likee folly to try to drive both the dev and live from the same DB, as anything you do on dev will effect live, and dev in turn will suffer from live loading as well. If you must why not set up a cron to regularly duplicate the live database to a development database, if you're really worried about indexes???