Re: [PERFORM] Can't get two index scans

2016-06-23 Thread Craig James
On Thu, Jun 23, 2016 at 8:47 AM, Jeff Janes wrote: > On Wed, Jun 22, 2016 at 9:36 PM, Craig James > wrote: > > On Wed, Jun 22, 2016 at 11:36 AM, Jeff Janes > wrote: > ... > But, JChem's cartridge is apparently not using a GiST index, which is > what my first guess was. I can't really figure ou

Re: [PERFORM] Can't get two index scans

2016-06-23 Thread Jeff Janes
On Wed, Jun 22, 2016 at 9:36 PM, Craig James wrote: > On Wed, Jun 22, 2016 at 11:36 AM, Jeff Janes wrote: >> You might be able to build a multiple column index on (smiles, >> version_id) and have it do the right thing automatically. Whether that >> is possible, and if so how effective it will ac

Re: [PERFORM] Can't get two index scans

2016-06-22 Thread Craig James
On Wed, Jun 22, 2016 at 11:36 AM, Jeff Janes wrote: > On Wed, Jun 22, 2016 at 9:03 AM, Craig James > wrote: > > I'm working with a third-party plugin that does chemistry. > > > Out of personal/professional curiosity, which one are you using, if > that can be disclosed? > ChemAxon (JChem) > >

Re: [PERFORM] Can't get two index scans

2016-06-22 Thread Jeff Janes
On Wed, Jun 22, 2016 at 9:03 AM, Craig James wrote: > I'm working with a third-party plugin that does chemistry. Out of personal/professional curiosity, which one are you using, if that can be disclosed? > Notice that it doesn't use the i_version_smiles index at all, but instead > applie

[PERFORM] Can't get two index scans

2016-06-22 Thread Craig James
I'm working with a third-party plugin that does chemistry. It's very fast. However, I'm trying to do a sampling query, such as the first 1% of the database, and I just can't get the planner to create a good plan. Here is the full query (the |>| operator does a subgraph match of a molecular substru