Forum: Building VoltDB Applications

Post: Question about procedure with in clause...

Question about procedure with in clause...
hchen
Jan 29, 2013
Hi,

I will need to write a procedure with in clause, seems like voltDB doesn't support that at this moment. So I have to replace it with a few "or" conditions, like where (id = ? or id=? or id=?), the problem here is we won't know number of possible values for id until run-time. I understand adhoc procedure would work, but I am wondering if there is a better way?
If we do need to use adhoc query, how would the performance be comparing with using prepare statements.

Thanks
vtkstef
Jan 29, 2013
Hi,

You may insert the in clause values in a separate work table so that you may substitute the in clause with a join clause.

Ciao
Stefano