Scientific studies have shown that goldfish have strong associative learning abilities, as well as social learning skills. In addition, their strong visual acuity allows them to distinguish between specific humans. It is quite possible that owners will notice the fish react favorably to them (swimming to the front of the glass, swimming rapidly around the tank, and going to the surface mouthing for food) while hiding when other people approach the tank.
In optimal conditions, goldfish may live more than 20 years, but most household goldfish generally live only six to eight years, due to being kept in bowls. The oldest recorded goldfish lived to 49 years.