Piwigo Bugtracker

Viewing Issue Advanced Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002105 [Piwigo] tags minor sometimes 2011.01.12 22:06 2011.01.19 13:31
Reporter rvelices View Status public  
Assigned To rvelices
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 2.2.0RC1 Product Version 2.1.5
  Target Version 2.2.0RC1 Product Build
Summary 0002105: Browsing tags is slow if tags contains many photos
Description Today 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 ...
Steps To Reproduce
Additional Information
Tags No tags attached.
browser any
Database engine and version
PHP version
Web server Apache 1.3.x
Attached Files

- Relationships

-  Notes
(0004654)
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.
(0004657)
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 :-)
(0004658)
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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Contact
Powered by Mantis Bugtracker