Suppose we have a system of linear and quadratic equations with rational coefficients and we want to find out whether this system has a real solution or not. The actual values of a solution is not important.
To be specific, let $D\in \mathbb{Q}^{m\times n}$, $Q_1,\ldots,Q_r \in \mathbb{Q}^{n\times n}$, and $c_1,\ldots c_r\in \mathbb{Q}$. Our goal is to determine whether there is an $x\in \mathbb{R}^n$ such that: $$Dx=0,$$ $$x^TQ_1x=c_1,\ldots,x^TQ_rx=c_r.$$
So my Question is this: is there a polynomial time algorithm to determine the existence of a real solution? Or better than that, is there a simple condition on the matrices $D,Q_1,\ldots,Q_r$ and the scalars $c_1,\ldots,c_r$ that is equivalent to the existence of a real solution?
Note that the existence of a complex solution can be checked by computing a groebner basis for the relevant ideal and checking that this ideal is not the entire polynomial ring (by weak Nullstellensatz). But in real case, I'm not aware of any way of algorithmically solve the problem (using real nullstellensatz for example).
(Existence of a real-valued solution to system of multivariate polynomial equations and its answer is relevant, but because of the lack of knowledge in algebraic geometry, I'm looking for a more specific answer.)