Skip to content
Advertisement

Trying to work out why my query is sluggish

So I have this query in C#, it takes about 3.6 seconds to complete.

Here is both table designs

Product review table:

enter image description here

Review Table:

enter image description here

I did have my where clause like so, but made no difference:

I’m not sure why it’s slow, does anyone have advice to speed it up? Thanks

More Info: Both tables have 6069 rows

I have also tried the following, but get this error message The specified type member ‘ProductReview’ is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.

For this:

Advertisement

Answer

So so I figured out the query I needed to use in linq, it’s fast now at 236ms

I was matching the product id in the wrong query

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement