Search filenames in MySQL database table restricted by filetype?
        Posted  
        
            by ju
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by ju
        
        
        
        Published on 2009-12-05T20:05:47Z
        Indexed on 
            2010/06/09
            6:02 UTC
        
        
        Read the original article
        Hit count: 325
        
Hello
I have a MySQL database that I replicate from another server. The database contains a table with this columns
ID, FileName and FileSize
In the table there are more than 4'000'000 records. I want to make fast a search in FileName (varchar) column
I found that I can use for this Sphinx search engine. The problem is that I want to restrict searches by filetype. Do I have to and how (trigers?) to extract file extensions for all rows? May be I have to create another table (because this one is replicated) and join them in 1:1 relation?
Can you give me some advices please :)
© Stack Overflow or respective owner