views:

71

answers:

1

Does it make sense to prepare a LOCK TABLE statement? I'm not really concerned about efficiency here, because it would only execute once a transaction and at most a few times a minute. I'm more wondering if the concept is meaningful.

I'm using the PostgreSQL JDBC driver, if it matters.

+1  A: 

Performance aside, preparing statements is useful when you have parameters in your query. Since your query has no parameters you don't need to prepare it.

Mark Byers
Yeah, standard practice here is to use prepared statements for everything, but I guess it would be taking that too far in this case. Thanks.
Justin K