Peel and slice the cucumber. Place the sliced cucumber in a bowl and sprinkle with 2 teaspoons salt. Allow to soak for 30 to 60 minutes. Drain and rinse. Pat dry with a paper towel.
Put the cucumber slices in a large mixing bowl. Add the onion, mayonnaise, dill, salt and pepper (and sugar if using) to the bowl. Toss until all ingredients are combined.