;ryansmit...@gmail.com>
Sent: Thursday, March 15, 2018 11:25:18 AM
To: sqlite-users@mailinglists.sqlite.org
Subject: Re: [sqlite] count optimisation
On 2018/03/15 12:20 PM, x wrote:
> select count(*) from TblA cross join TblB
>
> is over 200 times slower than
>
> select (select count(*)
On 2018/03/15 12:20 PM, x wrote:
select count(*) from TblA cross join TblB
is over 200 times slower than
select (select count(*) from TblA) * (select count(*) from TblB);
This is a human-level optimisation, it's not efficient for the database
engine to do the optimisation.
By human-level
select count(*) from TblA cross join TblB
is over 200 times slower than
select (select count(*) from TblA) * (select count(*) from TblB);
Not that it matters to me. I came across it by accident and mention it only in
case it’s a missed optimisation.
3 matches
Mail list logo