简体   繁体   中英

efficient way for storing query results?

I have a requirement like running 'n' numbers of select queries at fixed time intervals and storing that data. These results need to be pulled later upon a client's demand.

My question is:

  • 1) Is it okay to store it as csv files? Or could you suggest another format?
  • 2) Or, should it be stored as clob variable in a db?

Please suggest any compression techniques to store these query results; also, is it possible to store only revisions of previous resultsets instead of storing the whole resultset?

note:

  • The minimum time interval is hourly.
  • The number of queries (n) will be varying (currently 10 to 200 queries.)
  • The resultset size of each query is also varying (say 10 to 1,000,000 but mostly around 10k.)
  • The resultset data fetched between each time intervals doesn't differ much. (The row value will not be updated frequently.)

I am new to computer science and programming and also not very aware about storage or db designs.

听起来你应该建立一个数据仓库。

性能方面我认为最好有一个用于存储查询结果的表。

I think you need to store the data in a database. SQL database can serve you the best. Regarding to storing the data in fixed interval of time, you just need to make effect of the change in the data set instead of storing the whole data again and again. I don't know what is your requirement and how much infrastructure you can afford. If you have such huge queries, I recommend you to work in Distributed System . Use NOSQL database for better performance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM