tags:

views:

12

answers:

0

I have a subsonic query that's like this:

SubSonic.SqlQuery Qxy = new Select()
            .From(MessageStorage.Schema)
            .InnerJoin(MessageTracker.Schema)
            .Where("InsertDate").IsGreaterThanOrEqualTo(args[0])
            .And("InsertDate").IsLessThan(args[1])
            .And("MessageType").IsEqualTo(args[2])
            .And("TransmitReceiveType").IsEqualTo(args[3])
                //.And("MessageType").In("BillDataWithImage","BillImageOnly")
            .And("ClientID").IsEqualTo(args[4])
            .And("SourceID").IsEqualTo(args[5]);
            IDataReader ExtraReader = Qxy.ExecuteReader();

From that query I retrieve an xml message from a table. Deserialize it, do what i need to do with it serialize it and use subsonic to update it back in that table with this:

SqlQuery Query = new Update(MessageStorage.Schema)
                    .Set("Message").EqualTo(SerialHelper.Serialize(DE))
                    .Where("StoredMessageID").IsEqualTo(MyStoredMessageID);
                    Query.Execute();

For some reason it times out when it gets to the Query.execute. Funny thing is if I break it up and not use a join (basically query twice) it doesn't timeout. Is there a way i can use the inner join and still update without it timing out?