Piwigo Bugtracker

Piwigo bug tracker has moved to Github

This bugtracker is kept to provide history on old issues.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002105Piwigotagspublic2011.01.12 22:062011.01.19 13:31
Assigned Torvelices 
PlatformOSOS Version
Product Version2.1.5 
Target Version2.2.0RC1Fixed in Version2.2.0RC1 
Summary0002105: Browsing tags is slow if tags contains many photos
DescriptionToday we make 2 sql queries in 2 steps
1. get all image_ids for tags
2. get showable image_ids based on results from 1., user permissions and ordered accordingly

If there are several hundreds/thousand ids resulting from step 1., the second sql request will be huge and very slow (something like id IN (1,2,3,....xxxx) )

I propose to merge these two steps in a single sql query using a subquery ...
TagsNo tags attached.
Database engine and version
PHP version
Web serverApache 1.3.x
Attached Files

- Relationships

-  Notes
plg (manager)
2011.01.17 19:33

Have you performed some benchmarks? because my own benchmarks have always shown major downgrade of performances when using sub-queries. MySQL is very bad with sub-queries.
rvelices (developer)
2011.01.17 21:32

Yes you are 100% right. it is very slow.

however i'm testing a 3-table inner join query on my site ... it looks a lot better. almost no slow queries :-)
svn (reporter)
2011.01.17 22:16

[Subversion] r8726 by rvelices on trunk

-----[Subversion commit log]----------------------------------------------------
bug 2105 : Browsing tags is slow if tags contains many photos

- Issue History
Date Modified Username Field Change
2011.01.12 22:06 rvelices New Issue
2011.01.12 22:06 rvelices Status new => assigned
2011.01.12 22:06 rvelices Assigned To => rvelices
2011.01.12 22:06 rvelices browser => any
2011.01.12 22:06 rvelices Web server => Apache 1.3.x
2011.01.17 19:33 plg Note Added: 0004654
2011.01.17 21:32 rvelices Note Added: 0004657
2011.01.17 22:16 svn Checkin
2011.01.17 22:16 svn Note Added: 0004658
2011.01.19 13:31 rvelices Status assigned => closed
2011.01.19 13:31 rvelices Resolution open => fixed
2011.01.19 13:31 rvelices Fixed in Version => 2.2.0RC1

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker