for-loopout-of-memorydolphindb

In the SELECT ... FROM ... WHERE ... clause, using variables for range restrictions has caused an Out-Of-Memory (OOM) error


Symbol = `000001.SZ
result = select * from tmp where symbol = Symbol
result = select * from tmp where symbol = `000001.SZ

The above script will report an OOM error on the second line but not on the third. When I need to process A-share data and don't have enough memory to handle each stock at once, do I have to write a for loop to process them separately?


Solution

  • OOM is a kernel function for protect your system. If your request use all mamory, then you can do few moment:

    1. Give a swap memory.
    2. Insert in your server new phisical memory.
    3. Optimize your SQL code.