New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pager config #881
Comments
Valid point. We should add a config option for pager in myclirc. I'll see what I can do. |
Adding the pager config would be great, but fixing the extreme slowness would be even better. Is there any reason this fix hasn't been merged? |
A new version of cli_helpers is now released. It has the optimization. |
You can update using |
Thanks. I've updated and verified that a query that used to take over 20 seconds now runs almost instantly using the default |
For instance `pager = 'pspg --csv'`. Fixes dbcli#881
For instance `pager = 'pspg --csv'`. Fixes dbcli#881 Signed-off-by: Ulysse Buonomo <buonomo.ulysse@gmail.com>
First some background. I noticed that queries returning 100+ rows were very slow (20+ seconds) compared to mysql cli, so I searched the issues and found issue #873. Following advice in that issue, I gave the
pspg
pager a try, but with:table_format = psql
there was no real difference in query time. Switching to:
table_format = csv
made things much faster, very similar to the native mysql cli. The only problem is that the pager isn't always used, so for queries that don't return enough rows, I'm stuck looking at raw csv data.
So maybe an option to always use the pager? Or possibly just determine this based on the
table_format
andpager
settings?I'd also like to point out that it would be really helpful to be able to set
pager
in the.myclirc
file (I know this is mentioned in #581). In this case, I need to usepager = pspg --csv
, which won't work with mysql, so I can't put this inmy.cnf
, but it also means that I can't use a pager at all with the native mysql cli if I use this setup (unless I manually setpager
each time I run mycli). Ideally, setting the pager in .myclirc should override any setting in my.cnf. Obviously, globally setting the env PAGER='pspg --csv' isn't a good idea, so I've ended up writing a little shell script that sets PAGER and then runs mycli.The text was updated successfully, but these errors were encountered: