More in this section

Forums / Developing with Sitefinity / Direct query of contents for speed

Direct query of contents for speed

4 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    28 Jan 2010
    Link to this post
    Hi,

    Thanks for your previous answers. I dev a very large client demand solution, i working with a mixed solution using externals tables and sf custom modules. Actually i have more than 70 modules integrated and growing for a large demand solution many ajaxify. To store user information i use custom generic content modules and mixed information in external tables linked to some metafields. To expose client side information in quick response time actually i use my external tables (no internal links). I not very sql  expert and i need some explains to link the internal sf tables using one external query for speed. 
    Could you help me to make one sql direct query to one GC module content linking the main content and the metafields and retrieve my contents in speed mode?. Other suggestions welcome.

    many thanks for your advices. Romi.


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    28 Jan 2010
    Link to this post
    Hello Pierre,

    The only way that I could suggest using SQL queries is workign with INSERT INTO and SELECT FROM queries. This is not a good way, so I suggest that you should use Linq- SQL or another datata provider like OpenAccess. The pure SQL like INSERT INTO and SELECT FROM is useful for simple implementations that does not require performing multiple queries to your database.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    28 Jan 2010
    Link to this post
    Hi Ivan,

    Could you found one Select From sample linking the content with the GCMetafields table. I m a litle confused with the method of store the metafiels using multilines and guidID. I m not expert in agregates tables.
    thanks.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    28 Jan 2010
    Link to this post
    Hello Pierre,

    To select data you SELECT FROM "your table"

    To insert you INSERT INTO "your table" (...) VALUES ( ..)

    INSERT INTO sf_GCMetaData (
     sf_GCMetaData.ContentID,
     sf_GCMetaData.LangID,
     sf_GCMetaData.KeyValue,
     sf_GCMetaData.Application,
     sf_GCMetaData.ValueType,
     sf_GCMetaData.ShortText,
     sf_GCMetaData.LongText,
     sf_GCMetaData.DateTimeValue,
     sf_GCMetaData.IntegerValue,
     sf_GCMetaData.FloatValue,
     sf_GCMetaData.GuidValue,
     sf_GCMetaData.Boolean,
     sf_GCMetaData.Binary,
     sf_GCMetaData.Status,
     sf_GCMetaData.CntPrntID) 
    VALUES (NEWID(), 127, 'Test', '/Events', 0, 'test', null, null, 0,0, null, 0, null, 1, null)


    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
4 posts, 0 answered