A method and an apparatus for optimizing the growth of a plant by taking a measurement of at least one property of a plant growing in a growing medium, calculating the optimal nutritional requirement of the plant based on the measurement, and then injecting an optimal amount of at least one substance selected from the group consisting of water, fertilizer and a combination of water and fertilizer into the container. A rotating drum apparatus is provided for the practice of the invention.