Four sql are executed every minutes automatically?

Jan 30, 2011 at 9:35 AM

I run (Ctrl+Shift+F5) the Orchard from VS 2010 and open the corresponding MS Sql profiler, and find a very strange scenario:

Every minute there are four sql commands being executed, and they are:

SELECT this_.Id as Id45_3_, this_.Number as Number45_3_, this_.Published as Published45_3_, this_.Latest as Latest45_3_, this_.Data as Data45_3_, this_.ContentItemRecord_id as
ContentI6_45_3_, routepartr3_.Id as Id14_0_, routepartr3_.Title as Title14_0_, routepartr3_.Slug as Slug14_0_, routepartr3_.Path as Path14_0_, routepartr3_.ContentItemRecord_id as ContentI5_14_0_,
contentite1_.Id as Id47_1_, contentite1_.Data as Data47_1_, contentite1_.ContentType_id as ContentT3_47_1_, blogpartre2_.Id as Id25_2_, blogpartre2_.Description as Descript2_25_2_, blogpartre2_.PostCount as
PostCount25_2_
FROM Orchard_Framework_ContentItemVersionRecord this_
inner join Routable_RoutePartRecord routepartr3_ on this_.Id=routepartr3_.Id
inner join Orchard_Framework_ContentItemRecord contentite1_ on this_.ContentItemRecord_id=contentite1_.Id
inner join Orchard_Blogs_BlogPartRecord blogpartre2_ on contentite1_.Id=blogpartre2_.Id
WHERE this_.Published = 1 ORDER BY routepartr3_.Title asc


SELECT this_.Id as Id20_0_, this_.TaskType as TaskType20_0_, this_.ScheduledUtc as Schedule3_20_0_, this_.ContentItemVersionRecord_id as ContentI4_20_0_
FROM Scheduling_ScheduledTaskRecord this_
WHERE this_.ScheduledUtc <= '2011-01-30 08:48:03:000'


SELECT this_.Id as Id45_3_, this_.Number as Number45_3_, this_.Published as Published45_3_, this_.Latest as Latest45_3_, this_.Data as Data45_3_, this_.ContentItemRecord_id as
ContentI6_45_3_, routepartr1_.Id as Id14_0_, routepartr1_.Title as Title14_0_, routepartr1_.Slug as Slug14_0_, routepartr1_.Path as Path14_0_, routepartr1_.ContentItemRecord_id as ContentI5_14_0_,
contentite2_.Id as Id47_1_, contentite2_.Data as Data47_1_, contentite2_.ContentType_id as ContentT3_47_1_, containerp3_.Id as Id16_2_, containerp3_.Paginated as Paginated16_2_, containerp3_.PageSize as
PageSize16_2_, containerp3_.OrderByProperty as OrderByP4_16_2_, containerp3_.OrderByDirection as OrderByD5_16_2_
FROM Orchard_Framework_ContentItemVersionRecord this_
inner join Routable_RoutePartRecord
routepartr1_ on this_.Id=routepartr1_.Id
inner join Orchard_Framework_ContentItemRecord contentite2_ on this_.ContentItemRecord_id=contentite2_.Id
inner join Containers_ContainerPartRecord containerp3_ on
contentite2_.Id=containerp3_.Id WHERE this_.Published = 1


SELECT this_.Id as Id14_1_, this_.Title as Title14_1_, this_.Slug as Slug14_1_, this_.Path as Path14_1_, this_.ContentItemRecord_id as ContentI5_14_1_, contentite1_.Id as Id45_0_,
contentite1_.Number as Number45_0_, contentite1_.Published as Published45_0_, contentite1_.Latest as Latest45_0_, contentite1_.Data as Data45_0_, contentite1_.ContentItemRecord_id as ContentI6_45_0_
FROM Routable_RoutePartRecord this_
left outer join Orchard_Framework_ContentItemVersionRecord contentite1_ on this_.Id=contentite1_.Id
WHERE ((contentite1_.Published = 1 and not (this_.Path = '')) and this_.Path is not null)


it seems to concern about "version control", but who can tell me what really happened? Does it harm the performance?

Coordinator
Jan 30, 2011 at 7:15 PM

These are from background tasks the run every minutes.

The 2 I know of are

1. Task that refreshes the list of "slugs" of published content items and stores them in a in-memory cache to allow routing pages efficiently

2. Task that looks for any modified content item to refresh the Lucene index. This happens only of the indexing feature is active.