Solomon turns away from extolling the virtues of wisdom for a bit to pray to god to keep him holy. Holiness includes not eating and refraining from sex. Remember this guy has 1000 wives. And not gossiping or swearing. Or dishonouring your parents. Or fornicating or whoremongering. Cheating on your wife is bad, but thinking god will forget about your sins is worse. The very worst, of course, is a woman who leaves her husband and has a child with another man, because she has betrayed both god and her family. The punishment for her is public humiliation and infertility for herself and her children. Even after she dies, we should curse her name.
Wisdom is now bragging about how awesome she is and how favoured by god. She's worshiped everywhere. She smells like cinnamon, rooibos, myrrh, galbanum, onyx, balsa wood and frankincense. I'm surprised no vintners market their wines this way. She makes a bunch of promises to those who seek her, but also warns us that complete understanding isn't possible.
Now we're back to relationships. And lists. But at least the lists aren't genealogy. The three most beautiful things are: family unity, loving your neighbours, and a couple that gets along. Likewise, there are three things Solomon hates: people who are proud but poor, rich liars and old adulterers who doateth (v. 2).
The next thing he wants to talk about is old age. To prepare for old age, you need to learn stuff in your youth, so you'll be a good judge later on. You know, the Morgan Freeman old people, not the Grandpa Simpson types.
Now, completely on-topic: the nine things that make Solomon happy: children, living to see your enemy die (fuck yeah!) smart wives, not gossiping, being a slave to someone who's better than you , prudence, talking to people that listen, wisdom, fearing god. The worst thing you could do to Sol is be a wicked woman. He'd rather live with a lion AND a dragon. Also it makes you ugly. Other people will lose their courage, frown a lot and have wounded hearts. So if you have a wicked wife, for god's sake lock her in the house. If she won't stay inside, divorce her. He also can't stand affliction if his enemies do the afflicting or revenge if his enemies are getting it. He pities quiet men who live with chatty women. He warns us against pretty women, which his thousand wives must LOVE him for. He also says that women who outearn their husbands are full of anger, imputdence and much reproach (v. 22). Women who won't coddle their husbands' man colds cause weak knees and hands.