2x6 or 2x8 for deck joist
I strongly recommend you refer to code for your area. For example, my local code (IRC) specifies that the maximum allowable span for a 2x8 joist depends on the spacing of the joists (which you did not mention in your post), and the species of wood (which you did not mention in your post). IRC in the most restrictive condition allows a maximum span of 8'4" for a 2x8 joist made of redwood, western cedar, ponderosa pine, or red pine. Since you did not mention which way you were going to run the joists, if you need a 10 foot span you would need either a 2x8 or a 2x10, depending on the species of lumber you use.
Of course, you may be subject to a different code, if so your allowable spans could be different.