Jump to content

HeZa

Members
  • Content Count

    7
  • Joined

  • Last visited

Posts posted by HeZa


  1. 8 hours ago, Larry Hengen said:

    @Hans J. Ellingsgaard  I am using SQL Server.  The query uses an inner join on about 5 tables, a left outer on one and a cross apply with a group by and order by on the results  Pretty much a worst case scenario.  Some of the criteria is not indexed, and due to the data layout requires a large # of reads.  Some work has been done on the query to optimize it, and it's now better, but the question remains; what are the best settings to use for FireDAC when the cost and row count of a particular query is not generally known at design-time, as is the case with many dynamically built SQL queries.

    To give you one more idea to try: Use a sql window function to get the total count of all records as an additional column. Syntax for the column should something like this "count(*) over () as total".

     

    SELECT - OVER Clause (Transact-SQL)

     

    But I don't tried it by my self 🙂


  2. On 4/26/2020 at 1:39 AM, Attila Kovacs said:

    As I could not find anything measuring the InitUnits, and it has its reasons, I come up with this poor mans profiler: ...

    Oh, I'm only seeing it now. Thanks for sharing it.

×