In a medium bowl, stir together the mayonnaise and ketchup until smooth. Stir in the pickle relish, vinegar (or lemon juice), and sugar if you’re using it.
If you want a more traditional old-school version, stir in the finely chopped hard-boiled egg and minced onion. These give the dressing a little more body and a subtle savory kick.
Season with salt and pepper to taste. Depending on your ketchup and relish, you might need a little more vinegar for tang or a touch more sugar for balance.
For the best flavor, cover and chill the dressing for at least 30 minutes before serving. This lets all the flavors meld together.