Search code examples
delphiwinapidelphi-7

which is fastest win32 or SQL query?


I'm writing a client-server win32 application in Delphi 7 and in a section i need to bring aprox. 100k (less or more) rows with data from an Oracle database. Everything ok so far, but one of the fields must be calculated (a simple division with a large number).

My question is, how is less resources consuming and optimum, to make the division in the SQL query(maybe a store procedure), or to calculate the value in code for this field(on the server side)? I don't want to use a TDataset with calculated fields.

Oracle system(v 9.2) is also used by others applications, is not dedicated only to this application.

Thanks in advance.


Solution

  • The SQL Engines are designed for this type of task, so the answer is make the operation in the oracle system.

    Always do the SQL data manipulation tasks in the database server, which is designed for that.