Project

General

Profile

« Previous | Next » 

Revision 2048

bin/map: Added cache_sql env var to enable SQL query caching

View differences:

map
96 96
    in_table = opts.get_env_var('in_table', None, env_names)
97 97
    
98 98
    # Optimization
99
    cache_sql = opts.env_flag('cache_sql', True, env_names)
99 100
    by_col = in_db_config == out_db_config and opts.env_flag('by_col', False,
100 101
        env_names) # by-column optimization only applies if mapping to same DB
101 102
    if test: cpus_default = 0
......
119 120
    
120 121
    def connect_db(db_config):
121 122
        log('Connecting to '+sql.db_config_str(db_config))
122
        return sql.connect(db_config, log_debug=log_debug)
123
        return sql.connect(db_config, log_debug=log_debug, caching=cache_sql)
123 124
    
124 125
    if end != None: end_str = str(end-1) # end is one past the last #
125 126
    else: end_str = 'end'

Also available in: Unified diff