Menu

#75 Field Attributes for indexing SQL generation problem

V 3.8
open
5
2007-08-20
2007-08-20
No

In looking through the documentation, it appears that separate indices should be created for each field attribute in "idx1" ("{table}IDX{cnt}") that is checked, but instead all the checked columns are being combined into a single CREATE INDEX command. On page 22 of druid-essentials.pdf, it is explained as:

"With this template, given a \"Patients\" table,
the sql generator will generate the following indexes: \"PatientsNDX1\", \"PatientsNDX2\",
\"PatientsNDX3\" and so on."

Here's an example of the SQL code that is actually generated based on an example table called "Patients" containing three columns named AAA, BBB, and CCC, respectively:

CREATE INDEX PatientsIDX1 ON Patients(AAA,BBB,CCC);

Unfortunately this results in a single index based on a combination of all three columns, which is rarely needed and best suited for the "Extra code" tab.

Currently, after generating the SQL, I have to go in and manually edit the file (although I usually only do this outside of testing to reduce my workload), which is a bit tedius.

Here's an example of what the generated SQL code should look like, using the same example table as noted above:

CREATE INDEX PatientsIDX1 ON Patients(AAA);
CREATE INDEX PatientsIDX2 ON Patients(BBB);
CREATE INDEX PatientsIDX3 ON Patients(CCC);

Fixing this feature would be very useful. Thanks in advance.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB