Wrong sort order error in the flowchart log file

Problem or error:"Wrong sort order" entries appear repeatedly in the flowchart log file.

The entries look like this:

Wrong sort order detected (Last ID > This ID)
Last ID: Name=EMAIL_ADDRESS, Type=8, Chars=80, Bytes=80, 
dbtype=17, prec=80, Value='customer1@domain.com'
This ID: Name=EMAIL_ADDRESS, Type=8, Chars=80, Bytes=80, 
dbtype=17, prec=80, Value='customer2@domain.com'

Solution: This is a warning message. It means that the database returned records in an order different from the order that Unica Campaign expects. The Unica Campaign server detected this and stopped retrieving records from the database. Instead, Unica Campaign pulled the entire list of IDs down to the Unica Campaign temp directory on the server. There, Unica Campaign re-sorted the IDs and continued processing the rest of the flowchart with the correctly sorted list being used from the temp space on the server.

The Unica Campaign property enableSelectOrderBy can help to solve this problem.

  • If this property is set to false, Unica Campaign immediately pulls the records down to the temp directory and the Unica Campaign server process sorts them.
  • If this property is set to true (the default), Unica Campaign allows the database to sort the records and expects them to be sent to the Unica Campaign server process. If the records are not sorted correctly, Unica Campaign detects the discrepancy and re-sorts the list, which is what you see in this log file representation.

The records appear to be already sorted when listed in the log file. This is because Unica Campaign performs case-insensitive comparisons by default. To disregard case, Unica Campaign converts data to lower case before comparison, using a standard ASCII sort order. The database may sort strings that begin with an underscore ( _ ) and a small number of other characters so that these strings appear between the upper-case and lower-case strings. However, because Unica Campaign converts to lower case before comparison, it may sort those same characters differently.

The following Unica Campaign properties in the partition[n] | server | dataProcessing category control this behavior.

  • performCaseInsensitiveComparisonAs
  • compareCaseSensitive

If you understand the database's sort order, you can set the Unica Campaign parameters as required to be compatible with the database. See the Unica Campaign Administrator's Guide for details.