[TYPO3-dam] Slow SQL query in dam 1.1 beta 05 ?

ben van 't ende [netcreators] ben at netcreators.com
Wed Mar 28 23:28:13 CEST 2007


Hi Jonas,

Must be your server. No probs here regarding speed!

gRTz

ben



Jonas Tränkner wrote:
> Hi there
> 
>  
> 
> I have some problems with a query in the backend, when clicking on dams List module.
> 
> In tx_dam_cat there are about 1900 categories.
> 
> The Mysql Server is 5.0.32-Debian_7-log 
> 
> There is a join on tx_dam_cat, and with this join the query takes about 30 seconds to return, without it takes 0.02 secs... (phpmyAdmin says that)
> 
> Is this a general problem of my mysql version? Or a bad configuration  of the server?
> 
> Hope someone can/will answer...
> 
> Regards,
> 
> Jonas
> 
>  
> 
>  
> 
> // The 'slow' one:
> 
> SELECT DISTINCT tx_dam . *
> 
> FROM tx_dam
> 
> LEFT JOIN tx_dam_mm_cat AS tx_dam_mm_cat_a ON tx_dam.uid = tx_dam_mm_cat_a.uid_local, tx_dam_cat
> 
> WHERE 1
> 
> AND tx_dam.pid
> 
> IN ( 27 )
> 
> AND tx_dam.sys_language_uid =0
> 
> AND tx_dam.file_status !=255
> 
> AND (
> 
> tx_dam_mm_cat_a.uid_foreign
> 
> IN ( 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120 )
> 
> )
> 
> AND tx_dam.deleted =0
> 
> AND tx_dam_cat.deleted =0
> 
> ORDER BY title
> 
> LIMIT 20
> 
>  
> 
> // The 'fast' one (without all tx_dam_cat)
> 
> SELECT DISTINCT tx_dam . *
> 
> FROM tx_dam
> 
> LEFT JOIN tx_dam_mm_cat AS tx_dam_mm_cat_a ON tx_dam.uid = tx_dam_mm_cat_a.uid_local
> 
> WHERE 1
> 
> AND tx_dam.pid
> 
> IN ( 27 )
> 
> AND tx_dam.sys_language_uid =0
> 
> AND tx_dam.file_status !=255
> 
> AND (
> 
> tx_dam_mm_cat_a.uid_foreign
> 
> IN ( 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120 )
> 
> )
> 
> AND tx_dam.deleted =0
> 
> ORDER BY title
> 
> LIMIT 20
> 
>  
> 


-- 
netcreators :: creation and innovation
www.netcreators.com -  www.typo3.nl


More information about the TYPO3-project-dam mailing list