cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Will Declaring deployment code for a subtype affect performance?

Former Member
0 Likes
371

I have created a new parent type whose deployment code is already declared. I have now created a new subtype and given a deployment code. Will this affect performance and is this a bad practice.

Also, I have a existing OTB type whom I want to subtype, will giving a deployment code in this case affect performance also ? ( e.g product)

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Rebeck

By providing the deployment code, we actually tell the deployment system to create another table in the database for the declared item type. If it is a subtype, then a different table gets created for the subtype thus declared.

Now, the flexible search query happens on item type and not the table directly, and the query (by default) searches for the results in the subtype also. Now, if you created a subytpe "MyProduct" extends "Product" and then query select {pk} from {Product}, this will give you the results of both the instances of the type Product and My Product. If there is a different deployment specified for MyProduct, then the sql query that gets translated from the flexiquery would create a join of Product and MyProduct (automatically). This hits performance. Therefore, it is always advisable not to specify the deployment of any itemtype which does not extends GenericItem which is the parent of the item types.

Also, if you wish to exclude subtypes from your resultset, you can use the below mentioned format

 select {pk} from {Product!}

Hope this helps.