I'm not familiar with how rehashing is done in the default client, but I'm planning to pull the tables and columns from the current database only. Which means it's a single query:
``` select TABLE_NAME, COLUMN_NAME from information_schema.columns where table_schema = '%s' ``` The %s will be changed to the name of the database. This query will be run at the time of launch, then when the database name is changed by the 'USE' command or when a new table is created 'CREATE TABLE' or dropped. Doing it in background is an interesting idea. I'll have to spend some time on that one, maybe not for the first release. :) On Mon, Apr 20, 2015 at 11:45 AM, Nicholas Leippe <[email protected]> wrote: > Yes, there can be a lot of overhead. I've logged into busy systems > that have so many databases and tables it takes 30-60s to > hash--meanwhile you're twiddling your thumbs. I usually just ctrl-C > and add the -A and restart. > I know and use \# often--I frequently start with -A, then after my > initial stuff let \# run while I do something else if I need it on a > system like this. > It might also be nice to have a way to limit the hashing to within a > specific DB. > Another possibility would be to do the hashing in the > background--start with the selected db, or maybe even be smart enough > to hash on-demand, tied to the tab-completion--eg do databases and the > tables in the selected db, and as they are completed hash the next > relevent level, add some locality of namespace to determine the order > to hash ahead of time as it goes. > > /* > PLUG: http://plug.org, #utah on irc.freenode.net > Unsubscribe: http://plug.org/mailman/options/plug > Don't fear the penguin. > */ > /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
