cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
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...;"