Skip to main content
Question

StartTime as Sorting Field

  • January 14, 2026
  • 3 replies
  • 35 views

Forum|alt.badge.img+1

Hi All,

I have a large production records data set which i am utilizing to create reports using GraphQL queries.

I want to perform DESC sort to fetch the latest records for which i am using default ‘StartTime’ property(This property is derived from Schedulable Container). But system is generating this warning : "The sort is not backed by a cursorable index, which means query time sorting is necessary, which in turn means a lot more data must be read. Consider whether a cursorable index is a good fit."

What’s the best way to approach this so that i can fetch large data sets with improved performance?

Should i make a custom DateTime field as cursorable ? What are the impact of this ?

3 replies

Arild  Eide
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • January 15, 2026

Hi ​@Ayush Mishra 

 

The startTime property in Schedulable already has a cursorable index. The warning message likely indicates that the index is not being utilized when processing the query. There is a chance this relates to handling of nulls - can you please re-run the query, setting nulls first to true? 

 

Please see the API docs for reference.

 

Regards,

 

Arild Eide


Forum|alt.badge.img+1
  • Author
  • Active
  • January 20, 2026

@Arild Eide Thanks , This has resolved my warning.

Just to understand this better we are arranging the records to align the null records first and the actual records later, however does it actual return rows with null values?  which could be a problem if are trying to fetch a limited count of records


Arild  Eide
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • January 20, 2026

 Hi ​@Ayush Mishra 

Thanks for confirming.

Null first relates to the sorting only, to allow postgres to make use of the index present. The set of instances returned by the query is decided by query filter.

 

Regards,

 

Arild Eide