Hi,

I made some tests with lots of data on some tables.

In some tests I was using: 

SQLFORM(db.table, record=rc)

But it became very slow after putting data

When I was debugging I found that if you use IS_IN_DB() it searches the 
other table even if you are selecting one existing record or inserting a 
new one.

This is the line of code that turns SQLFORM slow sqlhtml.py:

elif OptionsWidget.has_options(field):
    if not field.requires.multiple:
        inp = self.widgets.options.widget(field, default)
    else:
        inp = self.widgets.multiple.widget(field, default)



The example is:

table a
id
name

table b
id
id_table_a (is_in_db)


if you use SQLFORM(db.table_b, record=x)

and if the table a have 10k records or more

the process runs very slow

debugging I saw that even inserting new record or selecting one record it 
checks all over table a...

I know that if you are updating the process depends on your database 
speed.. but it should not compromisse on inserting or viewing right?

Is there any solution for this?

Thanks

-- 
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/d/optout.

Reply via email to