Coder Social home page Coder Social logo

Out of memory error about csvq HOT 1 CLOSED

mithrandie avatar mithrandie commented on September 28, 2024
Out of memory error

from csvq.

Comments (1)

mithrandie avatar mithrandie commented on September 28, 2024

Depending on the content of the data, csvq will require at least 10 times more memory allocation than the target file size to keep all the data in memory at runtime.
Can you check if your system's RAM and virtual memory have enough space to handle the file? If not, it is probably difficult to solve the problem and you should look for another way than csvq.

The actual amount of memory required to handle the data can be estimated by cutting the data to a size that can be processed and then running the same query with the --stats option.

$ head -n 1000000 foo.csv > bar.csv
$ csvq --stats 'SELECT COUNT(*) FROM `bar.csv`'
+----------+
| COUNT(*) |
+----------+
|   999999 |
+----------+
Query Execution Time: 0.818470 seconds

       Resource Statistics
---------------------------------
  TotalTime:    0.818675 seconds
 TotalAlloc: 351,134,832 bytes
    HeapSys: 334,561,280 bytes
    Mallocs:  10,002,885 objects
      Frees:   2,769,768 objects

HeapSys is the amount of memory required on the system for the execution of the query.

from csvq.

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.