Results 1 to 4 of 4

Thread: Distinct OR Group By

  1. #1
    Join Date
    Sep 2009
    Posts
    3

    Distinct OR Group By

    Hi,

    Can someone please let me know if there are any benefits using Select Distinct vs. Group By in performance factor? According to my knowledge both are used to perform same task.

  2. #2
    Join Date
    May 2008
    Posts
    43

    Re: Distinct OR Group By

    According to development version of PostgreSQL,
    select DISTINCT is performed using the similar logic as GROUP BY,since the logic of GROUP BY leads to performance improvement over the code that was used.

  3. #3
    Join Date
    Nov 2008
    Posts
    109

    Re: Distinct OR Group By

    I dont think there is any performance different between the two. But I would think that DISTINCT is better. I suspect it's faster, but i have nothing to show for it

  4. #4
    Join Date
    Apr 2008
    Posts
    53

    Re: Distinct OR Group By

    Well in case of Ms Access at least the query results are not the same.
    You can compare it yourself:

    1. describe select distinct column_name from db.table_name
    2. describe select column_name from db.table_name group by column_name

    The second query will give you more detail results using sorting.

Similar Threads

  1. Replies: 5
    Last Post: 08-04-2011, 10:20 AM
  2. Select unique values without using distinct
    By Maya Angelou in forum Software Development
    Replies: 6
    Last Post: 17-05-2010, 10:26 AM
  3. SQL UNIQUE and DISTINCT
    By Taarank in forum Software Development
    Replies: 5
    Last Post: 10-05-2010, 10:40 PM
  4. What is the difference between Distinct and DistinctRow?
    By Orion lella in forum Software Development
    Replies: 4
    Last Post: 04-02-2010, 01:29 AM
  5. How to use DISTINCT in SQL
    By DotNetUser in forum Software Development
    Replies: 2
    Last Post: 07-09-2009, 11:33 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,507,440.68468 seconds with 17 queries