/
Reviewing & Optimizing Database Queries

Reviewing & Optimizing Database Queries

Imported From: http://groups.google.com/group/in-portal-dev/browse_thread/thread/b9a4cec31d2f00c7#

We are starting a new discussion where we want to review, point out and optimize SQLs in In-Portal. 

Please start listing your ideas in the following format: 

==============
Problem: Incorrect INDEX used on ResourceId in CustomData type tables

SELECT %1$s.* %2$s FROM %1$s 
LEFT JOIN '.TABLE_PREFIX.'%3$sPortalUserCustomData cust ON %1$s.ResourceId = cust.ResourceId 

Proposed Solution: Change INDEX type to UNIQUE on ResourceId field in PortalUserCustomData table. 

The same applies to all CustomData tables (ie. Links, Products, Categories, Articles, Topics)
==============

Please continue.

DA

Related Tasks

INP-833 - Getting issue details... STATUS