cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Pro extension simulates Bayesian Optimization runs. Prediction formulas stand in for experimental results. Run simulations and compare results. Download and use the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Franck_R
Level III

Add a configuration setting when connecting a database (postgresql) with JMP in the same CustomSQL() instruction

Hi,

I would like to speed up some SQL queries with special configuration values for my postgresql database.

For example: SET random_page_cost = 1

 

How can I do this in JMP?

Indeed if I create a CustomSQL query

SET random_page_cost = 1

Then a another one with a classic SELECT FROM... it doesn't work because the value "random_page_cost" seems to be reset to its default value on the second database connection.

 

Is it possible to chain 2 instructions in a same CustomSQL() statement in JMP? How?

 

Thanks!

1 REPLY 1
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Add a configuration setting when connecting a database (postgresql) with JMP in the same CustomSQL() instruction

Could you combine them in a single string and run them both at once?

 

sql = "SET random_page_cost = 1; SELECT FROM...;"

Recommended Articles