From: Mike Stephens Date: 2010-12-01T17:36:24+09:00 Subject: Re: A algorithm for finding the number The common sense thing to do is exactly what you have done. Make sure you have indexes on the fields. If it's still slow, try a different database. Five minutes and you should be able to move the data into Access (Jet), like this: require 'win32ole' connection = WIN32OLE.new('ADODB.Connection') connection.Open('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\Ruby\RubyAccess.mdb') recordset = WIN32OLE.new('ADODB.Recordset') sql = 'SELECT * FROM T1' recordset.Open(sql, connection) data = recordset.GetRows.transpose puts data recordset.close end -- Posted via http://www.ruby-forum.com/.