Comments (6)
@eliangcs Yes this is a real concern and using background threads has been in my mind for a while now. dbcli/mycli#109.
Can you tell me how many tables/views are in your database for this to happen? We've tried to minimize the number of queries needed to populate the completions, but I'm wondering if the queries themselves are taking too long or if the data transfer of the huge list from server to the client is taking so long.
Either way a background thread should help.
@dbcli/pgcli-core Do you guys have any thoughts on how else to handle this situation?
from vcli.
@amjith In my case I have 500+ tables and 100+ views.
from vcli.
Doing this in the background sounds like the way to go. But before that, we should also verify we're only running those queries once on startup, and only pulling as much data as we need.
from vcli.
Tried using the code from dbcli/pgcli#345 in vcli, but didn't work. I think it's because vertica_python connection is not thread-safe. We'll need a separate connection for the refresh thread.
from vcli.
@eliangcs You're right using the same pgexecute object for completion and query is not the way to go. I've updated the PR dbcli/pgcli#345 to handle that case. But I'm still working on resolving the case where multiple completion refresh can be triggered concurrently which can stomp on the completion data-structures.
I'll keep you posted on how I resolve that in pgcli.
from vcli.
Implemented in #22.
from vcli.
Related Issues (17)
- Auto-completion for file path
- \dv does not give me column info
- Set up Travis CI HOT 1
- ImportError: No module named importlib with behave on Python 2.6 HOT 3
- Command run time is always 0
- Hide command line password from ps
- More humanized error message
- "tuple index out of range"
- "-1 rows"
- Need to run query twice to reconnect
- explain does not show output HOT 2
- Python 3 support HOT 2
- Queries with "with" statements don't return output HOT 1
- Schema names that are upper case do not work properly with autocompletion HOT 1
- Consider pulling keywords from database
- 'Cursor' object has no attribute 'statusmessage' where runnig .sql files from vcli
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vcli.