In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
1320 [In-Portal CMS] Optimization task always 2012-06-12 04:30 2012-07-25 05:29
Dmitry  
alex  
normal  
closed 5.1.3  
fixed  
 
none 5.2.0-RC1  
https://groups.google.com/d/topic/in-portal-dev/1suPNynpm9E/discussion
Improving page load sql
1
0001320: Improving page detection sql
Currently we have the following SQL (actual ids are not important here) to select/find ID of currently loaded Category.

SELECT CategoryId
FROM Categories
WHERE ( (NamedParentPath = 'index') OR (NamedParentPath = 'Content/index') OR (`Type` = 2 AND CachedTemplate = 'index') ) AND (ThemeId = 8 OR ThemeId = 0)

This can become a problem when you have high number of Categories/Sections (ie. 3K+, but not a problem for small websites) since NamedParentPath is a TEXT field and can't be properly cached.

It would be quite an improvement if we start using Hash (int) column which can be Indexed quite well.

Additionally we might want to INDEX Type field too!
parent of 0001321closed  (5.2.0)alex Category Template Hash fields are not Populated during Upgrade 
png In-Portal_--_SQL.png (36,022) 2012-06-12 04:30
http://tracker.in-portal.org/file_download.php?file_id=1704&type=bug
png

patch reversed_template_detection_improvement.patch (15,043) 2012-06-12 11:20
http://tracker.in-portal.org/file_download.php?file_id=1705&type=bug
Issue History
2012-07-25 05:29 alex Note Added: 0004865
2012-07-25 05:29 alex Status resolved => closed
2012-06-12 15:54 Dmitry Relationship added parent of 0001321
2012-06-12 11:25 alex Note Added: 0004720
2012-06-12 11:25 alex Status reviewed and tested => resolved
2012-06-12 11:25 alex Fixed in Version => 5.2.0-RC1
2012-06-12 11:25 alex Resolution open => fixed
2012-06-12 11:25 alex Assigned To !COMMUNITY => alex
2012-06-12 11:25 alex Changeset attached 5.2.x r15390
2012-06-12 11:22 alex Note Added: 0004719
2012-06-12 11:22 alex Status needs testing => reviewed and tested
2012-06-12 11:21 alex Assigned To => !COMMUNITY
2012-06-12 11:21 alex Developer => alex
2012-06-12 11:21 alex Status active => needs testing
2012-06-12 11:20 alex File Added: reversed_template_detection_improvement.patch
2012-06-12 04:30 alex Reporter alex => Dmitry
2012-06-12 04:30 alex New Issue
2012-06-12 04:30 alex File Added: In-Portal_--_SQL.png
2012-06-12 04:30 alex Reference => https://groups.google.com/d/topic/in-portal-dev/1suPNynpm9E/discussion
2012-06-12 04:30 alex Change Log Message => Improving page load sql
2012-06-12 04:30 alex Estimate Points => 1

Notes
(0004719)
alex   
2012-06-12 11:22   
Will test all together later.
(0004720)
alex   
2012-06-12 11:25   
Fix committed to 5.2.x branch. Commit Message:

Fixes 0001320: Improving page detection sql
(0004865)
alex   
2012-07-25 05:29   
Since 5.2.0 version was released.