How can I find out where all these additional sqlite3 samples are generated in my rails application?

I am trying to figure out where a whole bunch of additional requests are generated by my rails application. I need ideas on how to handle this. Or, if someone can give me some advice, I would be grateful.

I get:

  SQL (1.0ms)    SELECT name
 FROM sqlite_master
 WHERE type = 'table' AND NOT name = 'sqlite_sequence'

  SQL (0.8ms)    SELECT name
 FROM sqlite_master
 WHERE type = 'table' AND NOT name = 'sqlite_sequence'

  SQL (0.8ms)    SELECT name
 FROM sqlite_master
 WHERE type = 'table' AND NOT name = 'sqlite_sequence'

repeated again and again with each query in the database (up to 70 times for one query)

I tried installing a plugin that tracked the request source, but that really didn't help. I use the hobofields, dunno gem if that's what it does, but I'm a bit attached to it at the moment.

Any tips on finding the source of these additional queries?

+5
4

GemActiveRecord connection_adapters/sqlite_adapter.rb 173 ( ActiveRecord 3.0.7), , , , :

SELECT name FROM sqlite_master WHERE type = 'table' AND NOT name = 'sqlite_sequence'

. , , .


, , , "find_by_name". , , .

+3

, .

,

for i in 0..70
  SqliteMaster.find(:all, :conditions=>["type=? and not name=?", 'table', 'sqlite_sequesnce'])
end

, , , , , .

0

I just saw this appearing in my magazines when I do a search using metasearch, but ONLY in development mode.

0
source

I believe this is caused by the plugin acts-as-taggable-on.

It will check if a column or cache column exists.

0
source

All Articles