I'm assuming @Josh isn't actually doing a straight 'select * from table' 
but is rather using that here as a placeholder for his real query which is 
presumably doing more and therefore might benefit from some indexing. If it 
really was just 'select * from table' why bother with executesql instead of 
just using the DAL with db(db.table.id > 0).select() - I'm giving the 
benefit of the doubt that it must actually be more complex.

On Wednesday, November 27, 2013 1:28:53 PM UTC-6, Niphlod wrote:
>
>
>
> On Wednesday, November 27, 2013 6:48:50 AM UTC+1, Brian M wrote:
>>
>> Querying out 47K rows is taking 4.5-5.5 seconds on my laptop (and its 
>> specs are nothing special). Not sure how the complexity of my query 
>> compares to yours but 20-150 seconds seems slow. Heck I can get back over 
>> 800K rows in about 75 seconds. BTW, running the same queries in SQL Server 
>> Management Studio is taking basically the same amount of time as in web2py; 
>> web2py is a tad slower but we're talking fractions to a 10 seconds 
>> depending on # of records. This is with the MSSQL Express instance running 
>> on localhost; having to go to a different server would certainly slow 
>> things down but I'm assuming you're not doing that. You may want to use the 
>> Management Studio to run the query with Query -> Include Actual Execution 
>> Plan and see if it suggests any indexes to help speed things up DB side.
>>
>
> select * from table has the easiest plan on earth: full table scan :D 
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to