### Description

Tracking total hits sometimes has a non-negligible impact on performance. We should disable it when not strictly required.
x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/execution/search/SourceGenerator.java
return;
        }
        if (container.sort() == null || container.sort().isEmpty()) {
            
            source.sort("_doc");
            return;
        }
        for (Sort sortable : container.sort().values()) {
            SortBuilder<?> sortBuilder = null;
            if (sortable instanceof AttributeSort as) {
                Attribute attr = as.attribute();
                
                if (attr instanceof FieldAttribute) {
                    FieldAttribute fa = ((FieldAttribute) attr).exactAttribute();
                    sortBuilder = fieldSort(fa.name()).missing(as.missing().searchOrder(as.direction()))
                        .unmappedType(fa.dataType().esType());
                    if (fa.isNested()) {
                        FieldSortBuilder fieldSort = fieldSort(fa.name()).missing(as.missing().searchOrder(as.direction()))
                            .unmappedType(fa.dataType().esType());
                        NestedSortBuilder newSort = new NestedSortBuilder(fa.nestedParent().name());
                        NestedSortBuilder nestedSort = fieldSort.getNestedSort();
                        if (nestedSort == null) {
                            fieldSort.setNestedSort(newSort);
                        } else {
                            while (nestedSort.getNestedSort() != null) {
                                nestedSort = nestedSort.getNestedSort();
                            }
                            nestedSort.setNestedSort(newSort);
                        }
                        nestedSort = newSort;