I'm testing a trial version of odac in direct mode and i'm having some problems.
TOraQuery don't return the correct RecordCount of a Select.
Order by don't works.
Thanks in advance.
Delphi 7, odac 8.2.7.0, Win 7 64 professional
RecordCount and order by
Re: RecordCount and order by
hello,
To make TOraQuery return a correct number of records that are returned in the query, you should either set the FetchAll property to True (in this case, all the records will be loaded to the DataSet, and you will get the correct number of records), or set the QueryRecCount property to true (in this case, before opening DataSet, an additional query will be executed: SELECT COUNT(*) FROM (YOUR QUERY) to find the number of records..
Please explain in more details (an example is desired) what do you mean by "Order by don't works."?
To make TOraQuery return a correct number of records that are returned in the query, you should either set the FetchAll property to True (in this case, all the records will be loaded to the DataSet, and you will get the correct number of records), or set the QueryRecCount property to true (in this case, before opening DataSet, an additional query will be executed: SELECT COUNT(*) FROM (YOUR QUERY) to find the number of records..
Please explain in more details (an example is desired) what do you mean by "Order by don't works."?
Re: RecordCount and order by
Sorry about order by, was a mistake.
I'm using just the TOraSession and TOraQuery. About FetchAll property, what is the difference between true or false? I mean, what is the impact in performance, speed, and things like that?
I'm using just the TOraSession and TOraQuery. About FetchAll property, what is the difference between true or false? I mean, what is the impact in performance, speed, and things like that?
Re: RecordCount and order by
hello,
When the FetchAll option is on, all data is fetched to the client, and, correspondingly, if the amounts of data are large, performance decreases. That's why it is recommended to turn this option on only when there is a real necessity (for example, when working in the Disconnect mode).
Also the value of the FetchRows property influences performance, because the size of the packets that are transferred through the network depends on this property. You can experiment with the value of this property (increase it) to increase the performance (Try setting this property value from 50 to 500).
The performance can depend on the types of fields that are available in the query. For example, if there are BLOB data fields in your query, obtaining of data can also take a lot of time.
When the FetchAll option is on, all data is fetched to the client, and, correspondingly, if the amounts of data are large, performance decreases. That's why it is recommended to turn this option on only when there is a real necessity (for example, when working in the Disconnect mode).
Also the value of the FetchRows property influences performance, because the size of the packets that are transferred through the network depends on this property. You can experiment with the value of this property (increase it) to increase the performance (Try setting this property value from 50 to 500).
The performance can depend on the types of fields that are available in the query. For example, if there are BLOB data fields in your query, obtaining of data can also take a lot of time.
Re: RecordCount and order by
I have just one more question, by now.
Like i said, i'm using just TOraSession and TOraQuery. There is something that i can do to incrase performance or to downsize the code?
Like i said, i'm using just TOraSession and TOraQuery. There is something that i can do to incrase performance or to downsize the code?
Re: RecordCount and order by
hello,
The application performance depends on various parameters, therefore a special approach is needed for each particular case to increase performance. For example, when working with BLOB fields, to increase performance, you should read the contents of BLOB fields when necessary only (the OraQuery.Options.DeferredLobRead option). As I wrote you before, the amount of records retrieved only once from the server also influence the performance, etc. The code size depends on your application tasks. For example, for an application, that only reads and edits data in a DB, it will be enough to customize data access and display components with no need to write code.
The application performance depends on various parameters, therefore a special approach is needed for each particular case to increase performance. For example, when working with BLOB fields, to increase performance, you should read the contents of BLOB fields when necessary only (the OraQuery.Options.DeferredLobRead option). As I wrote you before, the amount of records retrieved only once from the server also influence the performance, etc. The code size depends on your application tasks. For example, for an application, that only reads and edits data in a DB, it will be enough to customize data access and display components with no need to write code.