When doing inserts into a HABTM model, I am seeing the meta data query
being generated
with every insert:
[4;36;1mitems_releases Columns (0.020000) [0m [0;1m select
column_name as name, data_type as sql_type, data_default, nullable,
decode(data_type, ‘NUMBER’, data_precision,
‘FLOAT’, data_precision,
‘VARCHAR2’, data_length,
null) as limit,
decode(data_type, ‘NUMBER’, data_scale, null) as scale
from all_tab_columns
where owner = ‘CLIPS’
and table_name = ‘ITEMS_RELEASES’
order by column_id
[0m
[4;35;1mSQL (0.010000) [0m [0mINSERT INTO items_releases
(item_id, release_id) VALUES (10783, 10796) [0m
If I do 20 inserts (all part of a save! operation by the parent of the
HABTM), I get 20 queries for the model data.
This happens on a production web server. If I do the same operation
using a MySQL db, I do not see
the meta-data queries. Does anyone know why this would happed?
Thanks in advance,
Don McClean