Giter VIP home page Giter VIP logo

Comments (2)

harelba avatar harelba commented on May 24, 2024 1

Hi, sorry for the late reply.

q does load the data into memory for processing, but it does contain an automatic caching feature which might help for large files.

If you run q with the -C readwrite parameter, then a cache for each file will be generated automatically (if the cache file doesn't already exist). That would cause the first execution to be slow, but all additional executions of q for that file will be extremely fast.

In order to create the cache file, you could run q -t -C readwrite "select count(*) from original-file.tsv. This will create another file called original-file.tsv.qsql.

After this preparation step (which will take a considerable time for a 10GB file), you will be able to do either of the following:

  • Run additional q commands which use original-file.tsv (with either -C readwrite or -C read as additional params). The cache file will be detected automatically and used, speeding up queries considerably.
  • Run additional q command directly against the .qsql file. For example q -t "select ... from original-file.tsv.qsql where ...". These will use the cache file directly and will not even require the original tsv file. Since you'll be using the .qsql file directly, you can copy it to another machine and use it directly there as well, without having to copy the original file.

Hope that will help. I'd appreciate it if you can write down your impressions of the speedup here after testing this.

from q.

therobyouknow avatar therobyouknow commented on May 24, 2024

thank you @harelba

Hope that will help. I'd appreciate it if you can write down your impressions of the speedup here after testing this.

I will let you know! thank you!

from q.

Related Issues (20)

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.