MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Blog SerchTimeout   (Mono Support )

Viewed 11326 time(s), 4 post(s) 4/15/2013 5:59:12 AMby Dinesh.Sajwan
Dinesh-Sajwan

Dinesh.Sajwan

4/15/2013 5:59:12 AM
Hi,

We are using monox software in our organization from past 1 year.

We are facing issue with blog serching. It's gives timeout error although SQL query takes 33 second to execute on Sql Server management studio. We have already extended connection string timeout in our web.config file but it's did not solve the our problem. 

Currently we have following no of records in respective tables. Please help

Blog  -- 3016
BlogPost -- 11254
BlogPostRole -- 0
SnRelationship -- 43547
SnTag -- 10385

Example Blog Serch Query structurte

 exec sp_executesql N'SELECT DISTINCT TOP(@p2) [dbo].[BlogPost].[Id],
[dbo].[BlogPost].[IdentityId], [dbo].[BlogPost].[BlogId],
[dbo].[BlogPost].[Title], [dbo].[BlogPost].[Description],

[dbo].[BlogPost].[PostContent],
[dbo].[BlogPost].[DateCreated], [dbo].[BlogPost].[DateModified],
[dbo].[BlogPost].[DatePublished], [dbo].[BlogPost].[IsCommentEnabled],

[dbo].[BlogPost].[Raters],
[dbo].[BlogPost].[Rating], [dbo].[BlogPost].[Slug], [dbo].[BlogPost].[UserId],
[dbo].[BlogPost].[IsPublished] FROM (((( [dbo].[Blog]  INNER JOIN [dbo].[BlogPost]  ON

 [dbo].[Blog].[Id]=[dbo].[BlogPost].[BlogId])
LEFT JOIN [dbo].[BlogPostRole]  ON 
[dbo].[BlogPost].[Id]=[dbo].[BlogPostRole].[BlogPostId]) LEFT JOIN
[dbo].[SnRelationship]  ON 

 [dbo].[BlogPost].[Id]=[dbo].[SnRelationship].[BlogPotId])
LEFT JOIN [dbo].[SnTag]  ON 
[dbo].[SnRelationship].[Id]=[dbo].[SnTag].[RelationshipId]) WHERE ( (
[dbo].[Blog].[ApplicationId] = @p3 AND

 [dbo].[Blog].[LanguageId] = @p4 AND ( (
[dbo].[BlogPost].[IsPublished] = @p5 AND [dbo].[BlogPost].[DatePublished] <=
@p6) OR [dbo].[BlogPost].[UserId] = @p7) AND ( [dbo].[BlogPostRole].[RoleId]

 IN (@p8, @p9) OR [dbo].[BlogPostRole].[RoleId]
= @p10 OR NOT  EXISTS (SELECT
[dbo].[BlogPostRole].[BlogPostId] FROM [dbo].[BlogPostRole]   WHERE [dbo].[BlogPostRole].[BlogPostId] =

 [dbo].[BlogPost].[Id])) AND ( ( (
[dbo].[SnTag].[Tag] LIKE @p11 OR [dbo].[SnTag].[Tag] LIKE @p12 OR
[dbo].[SnTag].[Tag] LIKE @p13 OR [dbo].[SnTag].[Tag] LIKE @p14 OR
[dbo].[SnTag].[Tag] LIKE @p15)) OR

  ( ( [dbo].[SnTag].[Slug] LIKE @p16 OR
[dbo].[SnTag].[Slug] LIKE @p17 OR [dbo].[SnTag].[Slug] LIKE @p18 OR
[dbo].[SnTag].[Slug] LIKE @p19 OR [dbo].[SnTag].[Slug]

  LIKE @p20)) AND [dbo].[BlogPost].[Title] =
@p21 OR ( ( [dbo].[BlogPost].[Title] LIKE @p22 OR [dbo].[BlogPost].[Title]

  LIKE @p23 OR [dbo].[BlogPost].[Title] LIKE
@p24 OR [dbo].[BlogPost].[Title] LIKE @p25 OR [dbo].[BlogPost].[Title]

  LIKE @p26)) OR ( (
[dbo].[BlogPost].[PostContent] LIKE @p27 OR [dbo].[BlogPost].[PostContent] LIKE
@p28 OR [dbo].[BlogPost].[PostContent]

  LIKE @p29 OR [dbo].[BlogPost].[PostContent]
LIKE @p30 OR [dbo].[BlogPost].[PostContent] LIKE @p31)) OR ( (
[dbo].[BlogPost].[Description]

  LIKE @p32 OR [dbo].[BlogPost].[Description]
LIKE @p33 OR [dbo].[BlogPost].[Description] LIKE @p34 OR
[dbo].[BlogPost].[Description]

  LIKE @p35 OR [dbo].[BlogPost].[Description]
LIKE @p36))))) ORDER BY [dbo].[BlogPost].[DatePublished] DESC',N'@p2
bigint,@p3 uniqueidentifier,@p4 uniqueidentifier,@p5 bit,@p6 datetime,

  @p7 uniqueidentifier,@p8 uniqueidentifier,@p9
uniqueidentifier,@p10 uniqueidentifier,@p11 nvarchar(8),@p12 nvarchar(6),@p13
nvarchar(5),@p14 nvarchar(6),

  @p15 nvarchar(7),@p16 nvarchar(8),@p17
nvarchar(6),@p18 nvarchar(5),@p19 nvarchar(6),@p20 nvarchar(7),@p21
nvarchar(450),@p22 nvarchar(8),@p23 nvarchar(6),

  @p24 nvarchar(5),@p25 nvarchar(6),@p26
nvarchar(7),@p27 nvarchar(8),@p28 nvarchar(6),@p29 nvarchar(5),@p30
nvarchar(6),@p31 nvarchar(7),@p32 nvarchar(8),

  @p33 nvarchar(6),@p34 nvarchar(5),@p35
nvarchar(6),@p36 nvarchar(7)',@p2=100,@p3='67C919E2-8DF4-476A-B312-C26F82A36CFB',@p4='0543FD17-141B-4C40-BB35-B57F9EEC6EE0',

  @p5=1,@p6='2013-04-12 11:29:43.733',@p7='99FD7932-FFF8-43D1-A551-A08A01215799',@p8='20800248-CB7C-4D4B-BB40-99A9F11B050E',@p9='EBAF7B92-BB12-40C3-B3E4-FD40B9932E3E',

  @p10='E03DA7A5-3AAD-4EE5-AF51-9A5E01639FE0',@p11=N'% java %',@p12=N'java %',@p13=N'java%',@p14=N'% java',@p15=N'% java%',@p16=N'% java %',@p17=N'java %',@p18=N'java%',

  @p19=N'% java',@p20=N'% java%',@p21=N'java',@p22=N'% java %',@p23=N'java %',@p24=N'java%',@p25=N'% java',@p26=N'% java%',@p27=N'% java %',@p28=N'java %',@p29=N'java%',

  @p30=N'% java',@p31=N'% java%',@p32=N'% java %',@p33=N'java %',@p34=N'java%',@p35=N'% java',@p36=N'% java%'

  

-- Abhishek

 

 

 

This content has not been rated yet. 
1284 Reputation 156 Total posts
khorvat

khorvat

4/15/2013 7:08:40 AM
Hi,

you should try to switch the Blog search provider to the following configuration:

From
<add name="BlogSearchProvider" type="MonoSoftware.MonoX.SearchEngine.Providers.BlogSearchProvider, MonoX" BlogContentLength="255" BoldSearchPhrases="true" FullTextSearch="false" MaxNoOfResults="100"/>
 
To
<add name="BlogSearchProvider" type="MonoSoftware.MonoX.SearchEngine.Providers.BlogSearchProvider, MonoX" BlogContentLength="255" BoldSearchPhrases="true" FullTextSearch="true" MaxNoOfResults="100"/>
Basically you are using "simple" search configuration which is using SQL like operator and this tends to be slow on large data sets, so you need to switch to Full Text search in order to get the speed. Please try this and get back to us ... beside that we will need to identify the next bottle neck if any, so can you please check the execution times for e.g. methods related to BlogSearchProvider - Search (which points back to BlogRepository - SearchBlogPosts).

Regards

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
abhishekprasoon

abhishekprasoon

4/15/2013 6:35:16 PM
Hi,

I have reset web. Config key as per solution mention by you.But its gives me following error.

Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'dbo.BlogPost' because it is not full-text indexed  

-- Abhishek
This content has not been rated yet. 
25 Reputation 3 Total posts
imarusic

imarusic

4/15/2013 6:53:41 PM
Hi,

can you please check if you have properly Full text indexes set on your blog post table?

Regards.
This content has not been rated yet. 
3016 Reputation 428 Total posts