Class number of the compositum of a quadratic extension of a cyclotomic field Let $d\in\mathbb{Z}$ be a square-free integer and let $p$ be an odd prime. Let $K = \mathbb{Q}(\sqrt{d})$ and let $\zeta_p$ be a primitive $p$th root of unity. I am interested in knowing the class number of $L = K(\zeta_p)$.
1) I tried to use Sage to compute the class number using the following code for various values of $d$ and $p$. However, it is extremely slow even for small $d$ and $p$.
K = CyclotomicField(p)
L.< a > = K.extension(x^2 - d)
L.class_number()
Is there a more effective way to compute the class number of $L$?
2) The case that I am interested in is when $p$ is inert in $K$, and I actually want the class number of $L$ to be one. Are there any known results regarding this?

All your fields are abelian CM fields. There is a complete determination of all CM fields of class number one. (The case of imaginary quadratic fields is well known, but the other cases are somewhat easier, because they avoid issues concerning Siegel zeros.) For example, $\mathbf{Q}(\zeta_p)$ has class number bigger than one for all primes $p > 19$, so this will also be  a necessary restriction in your case. 
Here is the complete list of primes $p > 2$ and quadratic fields $K$ such that $K(\zeta_p)$ has class number one, with an indication as to whether  $p$ is ramified, inert, or split in $K$.


*

*The case when $K \subset \mathbf{Q}(\zeta_p)$. Then any $p \le 19$ works, where $K = \mathbf{Q}(\sqrt{(-1)^{(p-1)/2} p})$. In this case, $p$ is ramified in $K$.


If $K \not\subset \mathbf{Q}(\zeta_p)$ is quadratic, then (by Galois theory) there is a second quadratic field $K'$ contained in $K(\zeta_p)$ which is not in $\mathbf{Q}(\zeta_p)$. Since $p$ is odd, there will be a unique choice which is unramified at $p$, we take that choice below.


*The case when $K \not\subset \mathbf{Q}(\zeta_p)$. We again break into subcases depending on $p$.


a. $p = 11$, $K = \mathbf{Q}(\sqrt{-3})$, $K(\zeta_{11}) = \mathbf{Q}(\zeta_{33})$. The prime $11$ is inert in $K$.
b. $p = 7$, $K = \mathbf{Q}(\sqrt{5})$. The prime $7$ is inert in $K$.
c. $p = 5$, then $K = \mathbf{Q}(\sqrt{d})$ for the seven fields with
$$d \in \{-7,-3,-2,-1,2,13,17\}.$$
The prime $p$ is inert for $d \in \{-7,-3,-2,2,13,17\}$, i.e. $d \ne - 1$.
d. $p = 3$, then $K = \mathbf{Q}(\sqrt{d})$ for the fields with
$$d \in \{-163,-67,-43,-19,-11,-2,-1,2,5,17,41,89\}.$$
I'll let you compute the suitable splitting behavior. 
You can easily reproduce this list by looking at the paper "The determination of the imaginary abelian number fields with class number one" by Ken Yamamura. There is a link below.
http://www.ams.org/journals/mcom/1994-62-206/S0025-5718-1994-1218347-3/home.html 
