Warnings

Storage sometimes warns about things to stderr.  This page is designed to help explain the cause and possible solutions for these warnings.

Sort Operations

This warning message will say something about the number of sort operations that have occurred for a SQL statement.  This happens when you have an ORDER BY clause that does not use an index.  When you do not use an index, all the results from the query have to first be fetched, and then those results are sorted.  However, when the index is used, the data can be obtained row by row from the database, which will be much faster.

If, for some reason you cannot use an index in your ORDER BY clause, you can suppress this warning by including a SQL comment in your query that contains this text:

/* do not warn (bug [everything in these brackets does not matter] */

The bug mentioned should explain why the query cannot use an index.

Document Tags and Contributors

Tags: 
 Contributors to this page: teoli, sdwilsh
 Last updated by: teoli,