TOP vs. Percent: Hidden Costs in SQL Server - SQL in Sixty Seconds 206

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 7

  • @HemantgiriSGoswami
    @HemantgiriSGoswami 17 днів тому +2

    Nice one Pinal. I learned a new thing today.

  • @rafaelvaldes2732
    @rafaelvaldes2732 13 днів тому +1

    Hi Pinal, I love your videos and your blogs, I have a question for you, is there a way to change/set the port number of a new instance but using a cmd, tsql or powershell script?, this is for an automated installations I am working on. Regards and continue sharing your high level experience.

    • @PinalDaveSQLAuthority
      @PinalDaveSQLAuthority  13 днів тому

      Thank you for your kind words! Yes, you can change or set the port number for a SQL Server instance using command-line tools, T-SQL, or PowerShell. This can be done by modifying the appropriate registry settings or configuration properties for the instance. Once the port is updated, make sure to restart the SQL Server service for the changes to take effect. This approach works well for automated installations.

    • @rafaelvaldes2732
      @rafaelvaldes2732 13 днів тому +1

      Thanks Pinal, I will try to find something done in the web.

  • @benf101
    @benf101 17 днів тому +1

    I think that makes sense since SQL won't know how much "1 percent" is until it processes the entire dataset. After it processes the entire set then it can determine how much 1% is and grab that and throw away the rest. I would venture to guess that an ORDER BY clause would make these very similar (more logical reads) as that would also require SQL to process the entire dataset.