Skip site navigation (1) Skip section navigation (2)

Re: help with query: advanced ORDER BY...

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: <me(at)alternize(dot)com> <me(at)alternize(dot)com>
Cc: "Michael Fuhr" <mike(at)fuhr(dot)org>, <pgsql-novice(at)postgresql(dot)org>
Subject: Re: help with query: advanced ORDER BY...
Date: 2006-01-15 10:59:24
Message-ID: 95C07B27-2318-4409-8C59-3BB0F8ABF436@myrealbox.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Jan 15, 2006, at 19:53 , <me(at)alternize(dot)com> <me(at)alternize(dot)com> wrote:

>> Something you may consider doing is creating a view that masks the  
>> screen_number in those cases, something like
>>
>> create view schedule_public_view as
>> select theater_id
>> , screen_date
>> , screen_time
>> , case when no_screen_number then 0 else screen_number  end as  
>> screen_number
>> , movie_name
>> from schedules;
>
> wouldn't this be the same problem: pgsql not using the index for  
> screen_number anymore?

That may be. Only way to be sure is to try it. (And I'm not  
knowledgeable enough to know for sure.)

Michael Glaesemann
grzm myrealbox com




In response to

pgsql-novice by date

Next:From: Christian HofmannDate: 2006-01-15 18:19:04
Subject: Help with query
Previous:From: meDate: 2006-01-15 10:53:03
Subject: Re: help with query: advanced ORDER BY...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group