Skip to content

Question on performance #2

@yhan

Description

@yhan

Hi Les! Thanks for your presentation, very helpful.

A question regarding performance. I noticed that even you specify limited fields of your entity, the generated SQL query is fetching all the fields.
ex:

graphQL query:

query {
  platform {
    name
  }
}

generates:

info: 8/22/2021 18:10:09.844 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
      Executed DbCommand (35ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
      SELECT [p].[Id], [p].[LicenseKey], [p].[Name]
      FROM [Platforms] AS [p]

Is there a way to fetching only desired field from DB?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions