This reads a huge database (SQLite) and extract any IP address similar to ip_base:for num_db=1:10 i=1;%     connection to different dbdb_name='C:\Users\galotibi\Documents\MATLAB\user';obj_name='jdbc:SQLite:C:\Users\galotibi\Documents\MATLAB\user';databases=strcat(db_name,num2str(num_db),'.db');objects=strcat(obj_name,num2str(num_db),'.db');conn=database(databases,'','','org.sqlite.JDBC',objects);% ----------------------------------------------------------------------num_row='select count(*)from IP_logs';results=exec(conn,num_row);results=fetch(results);Fcount=results.Data;count=cell2mat(Fcount);start_a=0;start_b=10000;    % 10000 to know how many round do we need, data is huge row=count/start_b;row=ceil(row);% rounding the valuequery_base='select * from IP_logs where rowid>';wiki=cell(1,7);for ii=1:row        % to take 10000 record every time          query_1=strcat(query_base, num2str(start_a+(ii-1)*start_b));        query_2=strcat(query_1, ' and rowid<=');        query_3=strcat(query_2, num2str(start_b*ii));        results= exec(conn,query_3);        results=fetch(results);        ip_base='91.198.174.';            for n=1:10000                if n>size(results.Data,1)                break;                end;  if strncmp(results.Data(n,2), ip_base,length(ip_base)) ||     strncmp(results.Data(n,4), ip_base,length(ip_base))                    wiki(i,:)=results.Data(n,:);                    i=i+1;                end            end;        clear results;
Searching for log entries in SQLite that involve a particular IP subnet
matlab;sqlite;ip address