cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

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