Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5959045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:37:49+00:00 2026-05-22T18:37:49+00:00

I am building a RIA Domain Service that needs to perform queries on a

  • 0

I am building a RIA Domain Service that needs to perform queries on a table with lots of data.
By working on this, I’ve realized the table size can effectively be an issue.

For example:

return this.ObjectContext.Logs;

fails with a 504 err, whereas:

return this.ObjectContext.Logs.Take(10);

works.

As you can see I am working on a table of logs, which includes a field “username”. I need to retrieve all distinct usernames from the table. So I set up this method:

public IEnumerable<string> GetUsers()
    {
        var users = (from l in this.ObjectContext.Logs
                    select l.Username).Distinct().Take(10);

        return users;
    }

I am trying to execute all the necessary operations on the server-side, in order to reduce the transferred information (and relative delay) to the minimum.

However, even with that query I get a 504 error. In Fiddler I see: “ReadResponse() failed: The server did not return a response for this request.”

Initially I thought this to be a transport issue (perhaps the size of the transferred data was too big or so), so I set up a breakpoint on “return users”. I ran the code and the debugger stopped on the “return users” line. I clicked on “results view” but at that point it was unable to display any result, just showing an error.

I’d like to report here the error, but suddenly Visual Studio does not stop anymore on the DomainService breakpoints and stops only on the Silverlight project’s ones. I am actually investigating this as it seems that it is not calling the domain service anymore (fiddler does not show any call to the ria domain service anymore).

Is there anybody who can assist me in solving these issues? I am really struggling in getting this to work.

Thanks in advance,
Cheers,
Gianluca

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:37:50+00:00Added an answer on May 22, 2026 at 6:37 pm

    Ok, so after a while, here I am to provide an answer to my own question.

    There is nothing wrong with RIA or EF, etc. Long operations will hit time and size limits, that’s normal and correct. In my case, we are talking about a table that contains 32M rows.

    We are using PostgreSQL 9.0. The table was already indexed but when the number of returned rows is elevated, indexes are not used. In order to overcome the performance issues that we met, we underwent a major refactoring of both database and application. Tables have been partitioned, support tables with counters were created and have now been used in place of COUNT operations, auto-vacuum enabled, increased the number of indexes on all the most meaningful and used search fields, and – important – queries were reviewed in order to reduce the returned recordset.

    The new application, which is running on a dev environment (that has just few resources available), answers within a couple of seconds to any request, even if the database is growing 2-4M rows per month.

    That’s all. I hope this can help someone else.

    Cheers,
    Gianluca.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a Silverlight 3 application that uses .NET RIA Services. This application
building a site using PHP and MySQL that needs to store a lot of
How do you capture errors that happen on client side when building RIA apps
Building decent RIA data-intensive crud-like application is still hard. In spite of existence tons
Building a test web service and all was working great, so I added the
I am building an RIA application using Flex 4.6 that contains a main borderContainer
I am building an application based on Ria Services. Amongst the default methods that
Building an app using a calendar on a Google Apps domain that has SSL
I am building a WCF RIA service used for Silverlight application. I am using
Building on this question: Django Celery Time Limit Exceeded? I have some tasks that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.