SELECT COUNT(*) ...

This does not scan and count rows IIRC, but reads the row count from
table/cache PK index length.

On Tue, Mar 3, 2026 at 3:44 AM Charlin S <[email protected]> wrote:

> Hi,
> The Ignite query (select count(1) from Model) is heavy queries  that I
> currently use in the C\# application,  to get the cache count. What would
> be a lighter alternative for determining the cache size?  .
> I observed in the log file
> [20:42:59,397][WARNING][long-qry-#29%Prod_Grid%][HeavyQueriesTracker]
> Query execution is too long
> [globalQueryId=f1ce0bdd-e9ba-46c6-9d8c-5261250f6827_102282,
> duration=4337ms, type=MAP, distributedJoin=false, enforceJoinOrder=false,
> lazy=false, schema=TestModel, sql='SELECT
> COUNT(1) __C0_0
> FROM "TestModel".TestMODEL __Z0', plan=SELECT
>     COUNT(1) AS __C0_0
> FROM "TestModel".TestMODEL __Z0
>     /* "TestModel".TestMODEL.__SCAN_ */
>     /* scanCount: 6293381 */, reqId=102280, segment=0]
> [20:43:00,203][WARNING][query-#79021%Prod_cGrid%][HeavyQueriesTracker]
> Long running query is finished
> [globalQueryId=f1ce0bdd-e9ba-46c6-9d8c-5261250f6827_102282,
> duration=5134ms, type=MAP, distributedJoin=false, enforceJoinOrder=false,
> lazy=false, schema=TestModel, sql='SELECT
> COUNT(1) __C0_0
> FROM "TestModel".TestMODEL __Z0', plan=SELECT
>     COUNT(1) AS __C0_0
> FROM "TestModel".TestMODEL __Z0
>     /* "TestModel".TestMODEL.__SCAN_ */
>     /* scanCount: 7496438 */, reqId=102280, segment=0]
>
> Thanks & Regards,
> Charlin
>
>
>

Reply via email to