Hide
Siafoo is here to make coding less frustrating and to save you time. Join Siafoo Now or Learn More

Utility for loading GeoIP data into a PostgreSQL database

Revision 3 vs. Revision 4

Changelog: Fixed indexes

Legend:

Unmodified
Added
Removed
  • Code

    r3 r4  
    5151        print '\033[1;32mDone\033[1;m'  
    5252                 
    5353    def create_indexes(self):  
    5454        print 'Adding Indexes...',  
    5555        self.db_execute('''  
    56               CREATE INDEX ix_end_ip  
    57                ON blocks  
    58                USING btree  
    59                (end_ip);  
    60                
    61               CREATE INDEX ix_start_ip  
    62                ON blocks  
    63                USING btree  
    64                (start_ip);  
     56             CREATE INDEX ix_start_end_ip ON blocks  
     57                USING btree (start_ip, end_ip) WITH (FILLFACTOR=100);  
     58             CREATE INDEX ix_end_start_ip ON blocks  
     59                USING btree (end_ip, start_ip) WITH (FILLFACTOR=100);  
    6560            ''')  
    6661        print '\033[1;32mDone\033[1;m'  
    6762         
    6863    def create_functions(self):  
    6964        print 'Adding utility functions...',