Is there a way to set a session variable but not save them in the sessions table? I wanted to save a huge array in a $_SESSION variable. If I understand it correctly, Drupal saves the entire $_SESSION into the sessions table. But when the $_SESSION variable gets to around 3mb, MySQL throws an error.

I don't want to increase max_allowed_packet size, and I don't really need Drupal to save the array variable in the sessions table.

So, is there a way to set a $_SESSION variable that can be excluded from being saved into the sessions table?
You should probably look first at either not storing this data but instead deferring its calculation, or at alternative storage methods, eg perhaps cache_set() and cache_get(). You could easily run into the same DB limitations there of course.

You probably don't need to store this data to the session at all, and as you've discovered it can be problematic to do so.

I've seen developers use  $_SESSION as a global variable to pass data around, and as temporary per-visitor storage. This is possible, but there are limitations and likely better ways - for which you might need to zoom out to the actual problem at hand. (Do you need to store a rendered collection of kitten profiles, or just a list of kitten IDs then render later?)

If you do actually need to store such large datasets to the session, you'd probably have to replace the default session management in Drupal or reconfigure your DB (which you've said you'd rather not do). In that case perhaps modules like Session Proxy or perhaps Memcache would help ... But try not to go there :)