The expression LONG SHOT means an attempt or effort that is not likely to be successful:
My goal was to reduce the costs, but I was aware of the fact that without laying off some workers it was a long shot.
Your plan is a long shot, but I don’t want to discourage you.
Look, I know it’s a long shot, but I still want to try.
It may also mean a person or thing that is not likely to win sth (like a contest or race):
He put his bet on your greyhound, but I think the dog’s a long shot.
Betting on long shots at the racetrack is not a good idea, although from time to time it may turn out profitable.
Although we think she’s a long shot, some people believe she could win the election.
The expression BY A LONG SHOT means by far:
It’s the most difficult situation I ever dealt with—by a long shot.
The expression NOT BY A LONG SHOT means not at all:
I’m not done with you yet, not by a long shot.
Here’s the video version of the article: