sometimes the mess part isnt always visible. they give off ammonia like there is no tomorrow and the smaller the tank and the more goldfish there are the more strained the bacterial filtration will be.
Here is a word from someone:
"A four foot tank is mandatory for comets and shubunkins, which are better suited to outdoor ponds than indoor aquaria in the long run. A single fancy goldfish such as a black moor, oranda, ryukin, pearlscale, etc. can be housed in a tank 30 inches long (typically a 29 gallon or 20 gallon long, or 114 liter tank) but keep in mind, this is the absolute minimum size.You should always aim for bigger with goldfish! There are two primary reasons for this:<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> Dilution of metabolic wastes. Goldfish have a different digestive system than most fish - they lack stomachs, for one thing. They produce copious amounts of ammonia for their size, not to mention numerous poos, to put it gently. A bigger tank (with ample filtration) goes a long way towards keeping the substrate tidy and the water healthy. Zero ammonia and nitrites is a must in any aquarium, and an undersized goldfish tank will be prone to ammonia spikes.<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
Space. Goldfish are both active and social - a combination that suggests this species needs serious space! Goldfish will benefit from the addition of tankmates of its own kind. (Take care not to mix the more delicate fancies, such as celestials and orandas, with boisterous comets or shubunkins.) A single goldfish is preferable only when the size of the tank does not allow for more than one to be housed. Goldfish take advantage of all levels of the water column (top, middle, bottom) so they appreciate lots of open swimming areas. A long tank is vastly preferable to a tall tank because of the improved gaseous exchange it affords."
And here is a great link you should check out:
Goldfish 101: Goldfish May Be Popular, And They May Be Cheap, But That Doesn't Make Them Easy Aquarium Fish