Throwing out balls definitely no good.
you don't have a goal or finish line, you don't bear down, you don't track progress.
It's just a lazy way to deal with boredom.
Playing racks is also meh unless you add some conditions.
Having a specific challenge (like running out) and goals (beating the ghost in a race,
beating a high run, improving a score) will ensure your practice is focused.
This is the drill I like.
It's basically the 6 or 7 ball ghost, but if there's any shot I mess up,
I replace all the balls and redo the entire rack from the 1.
And if you're primarily an 8 baller you don't shoot in order.
Copy-pasted from another post:
===============================================================
1. Roll balls randomly onto the table. How many balls depends on your skill level.
Your APA skill level is a good number.
2. Start w/ball in hand, shoot in any order, But plan the entire run ahead of time.
First plan which pockets the balls will go into (usually the nearest hole).
Then decide which ball is best to start with (usually the hardest shot).
Lastly plan how you'll make the cue ball move from one ball to the next
(e.g. "I'll sink the four, bounce off the top rail, then sink the 11").
When you're done, you should have an exact gameplan like:
"8 in the corner, draw back for 2 in the side, then the 4 in the other corner,
with an angle to bounce off the top rail, then sink the 11."
3. Run them the way you planned.
If you ever miss, reset ALL balls back to their original position, and start over.
Try again. If you can't get out after several tries, maybe you need a new, easier plan.
4. If you ever screw up position so bad that you must bank or shoot a ball in the wrong pocket... consider that a miss,
reset all the balls and start again. It doesn't matter if you could make a "recovery shot" to finish the run.
We're not interested in trying to get lucky with 'hail mary' shots.
We're interested in trying to come up with a simple, safe, easy plan... and then executing it with no screwups.
If you get out most of the time with 4 balls, then add a ball. If you just can't do it, subtract a ball. As your skill level goes up, keep adding balls.
This is great training for 8 ball but also useful in terms of teaching you to plan carefully, shoot carefully,
and stay focused throughout an entire run. Keep it simple, look for balls that naturally group together,
for example a stop shot that will leave you straight in on another shot.
Generally, the more stop shots you can do, the better.
Advanced:
Shoot the balls in numerical order. This is very similar to playing games like 9 ball,
and forces you to make difficult position shots that require moving the cue ball all over the table.
This one is more about execution while the other one is more about planning.
Don't be undisciplined about these drills! If you screw up, reset and do all the shots!
By repeating the first shots over and over, you're burning those specific shots into your muscle memory.
Don't be afraid to look at your plan again, I'd say after 3 or 4 screwups it's time for a new plan or 1 less ball.