Goldman Sachs Interview Question

How do clustered sequences work? How does the database optimize or cache queries and/or stored procedures?