sagiegurari / simple-oracledb

Extend capabilities of oracledb with simplified API for quicker development.
Apache License 2.0
36 stars 4 forks source link

about data streaming performance #13

Closed behroozshafiabadi closed 8 years ago

behroozshafiabadi commented 8 years ago

when i use streaming feature in oracledb,and set timer on it,its take ~17 ms to gets firts row and ~320 to end event triggered and whole data comes out.(objectMode is true) but in normal use case when i use traditional way without stream result,its only take about ~25 ms to get whole data. what is wrong in this use case ? everything is ok ? I thought streaming is more powerful and faster

sagiegurari commented 8 years ago

Ya the performance should be not as good since i have to use getRow one at a time. However not sure about your numbers, will run some tests as well when i have time. The stream is meant to save on memory, not time. So the decision on what to use is case by case basis.

sagiegurari commented 8 years ago

by the way if you don't have LOBs in your query, check the connection.queryStream in the original oracledb library. I wrote it as well, but there I don't convert LOBs to string/buffer so it should be a bit faster and give you same functionality.

behroozshafiabadi commented 8 years ago

@sagiegurari thank to your notation no i have not any LOBs type column is that you mean time mybe decrease and stream be faster than non stream query ?

sagiegurari commented 8 years ago

if no LOBs, try using connection.queryStream and see if it improves your overall performance instead of connection.query.

behroozshafiabadi commented 8 years ago

@sagiegurari ok i check it

behroozshafiabadi commented 8 years ago

no sensible effect :) thank you

sagiegurari commented 8 years ago

too bad. i wrote down an item for myself to check and see if i can do something about the performance, because I believe there is some solution there.