Giter Site home page Giter Site logo

Comments (6)

amjith avatar amjith commented on August 28, 2024

@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.

eliangcs avatar eliangcs commented on August 28, 2024

@amjith In my case I have 500+ tables and 100+ views.

from vcli.

j-bennet avatar j-bennet commented on August 28, 2024

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.

eliangcs avatar eliangcs commented on August 28, 2024

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.

amjith avatar amjith commented on August 28, 2024

@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.

eliangcs avatar eliangcs commented on August 28, 2024

Implemented in #22.

from vcli.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.