You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for your great work. I am new to this library and using it first time in my project. I found that when I am using the following code: var result = await _db.Query("Customers") .OrderBy("Id") .Select("Id", "Name", "Tag") .PaginateAsync( 1, 10 ) .ConfigureAwait(false);
In the log, I can see that it uses SELECT COUNT(*) AS [count] FROM [Customers]
Would it be possible to change to COUNT(1) instead of COUNT(*)?
Kind regards,
Binoy
The text was updated successfully, but these errors were encountered:
________________________________
From: Niels Lucas ***@***.***>
Sent: Sunday, July 23, 2023 8:53:21 AM
To: sqlkata/querybuilder ***@***.***>
Cc: Binoy ***@***.***>; Author ***@***.***>
Subject: Re: [sqlkata/querybuilder] PERF: PaginateAsync uses Count(*) to count number of rows (Issue #682)
Why would you need this? I did a 1 minute research (sorry, to lazy to do more) and found this:
https://stackoverflow.com/questions/1221559/count-vs-count1-sql-server
The answere: There is no difference.
For the record, not trying to attack you, just curious for the 'why'. Its always a good practise to supply a 'why' to a feature request.
—
Reply to this email directly, view it on GitHub<#682 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABEFY3DRY7HWXUWGXXP7OODXRUNEDANCNFSM6AAAAAA2K24T5Y>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
Hi there,
Thanks for your great work. I am new to this library and using it first time in my project. I found that when I am using the following code:
var result = await _db.Query("Customers")
.OrderBy("Id")
.Select("Id", "Name", "Tag")
.PaginateAsync(
1,
10
)
.ConfigureAwait(false);
In the log, I can see that it uses
SELECT COUNT(*) AS [count] FROM [Customers]
Would it be possible to change to COUNT(1) instead of COUNT(*)?
Kind regards,
Binoy
The text was updated successfully, but these errors were encountered: