@repl_command<EOL><INDENT>def do_throttle(self, *args):<DEDENT>
args = list(args)<EOL>if not args:<EOL><INDENT>print(self.throttle)<EOL>return<EOL><DEDENT>if len(args) < <NUM_LIT:2>:<EOL><INDENT>return self.onecmd("<STR_LIT>")<EOL><DEDENT>args, read, write = args[:-<NUM_LIT:2>], args[-<NUM_LIT:2>], args[-<NUM_LIT:1>]<EOL>if len(args) == <NUM_LIT:2>:<EOL><INDENT>tablename, indexname = args<EOL>self.throttle.set_index_limit(tablename, indexname, read, write)<EOL><DEDENT>elif len(args) == <NUM_LIT:1>:<EOL><INDENT>tablename = args[<NUM_LIT:0>]<EOL>if tablename == "<STR_LIT:default>":<EOL><INDENT>self.throttle.set_default_limit(read, write)<EOL><DEDENT>elif tablename == "<STR_LIT>":<EOL><INDENT>self.throttle.set_total_limit(read, write)<EOL><DEDENT>else:<EOL><INDENT>self.throttle.set_table_limit(tablename, read, write)<EOL><DEDENT><DEDENT>elif not args:<EOL><INDENT>self.throttle.set_total_limit(read, write)<EOL><DEDENT>else:<EOL><INDENT>return self.onecmd("<STR_LIT>")<EOL><DEDENT>self.conf["<STR_LIT>"] = self.throttle.save()<EOL>self.save_config()<EOL>
Set the allowed consumed throughput for DQL.

# Set the total allowed throughput across all tables
> throttle 1000 100
# Set the default allowed throughput per-table/index
> throttle default 40% 20%
# Set the allowed throughput on a table
> throttle mytable 10 10
# Set the allowed throughput on a global index
> throttle mytable myindex 40 6

see also: unthrottle