I have a table called jobs with ~17 millions records. Without an index on the queue column, the following query
select count(*) from jobs where lower(queue) = 'normal' found ~2.6 millions records in 10160ms With the following index: create index lower_queue on jobs (lower(queue)) the same query only took 3850ms On Sat, Jun 29, 2013 at 2:08 PM, Joshua D. Drake <j...@commandprompt.com>wrote: > > On 06/29/2013 09:24 AM, bhanu udaya wrote: > > Upper and Lower functions are not right choice when the table is > 2.5 >> million and where we also have heavy insert transactions. >> > > Prove it. Seriously, just run a test case against it. See how it works for > you. Inserts are generally a very inexpensive operation with Postgres. > > >> I doubt, if we can cache the table if there are frequent >> inserts/updates. The good idea would be to get the DB to case >> insenstive configuration like SQL Server. I would go for this solution, >> if postgres supports. >> > > Postgres does not. > > And as Jon said, maybe Postgres isn't the right solution for you. That > would be a bummer but we can't be all things to all people. > > > JD > > -- > Command Prompt, Inc. - http://www.commandprompt.com/ 509-416-6579 > PostgreSQL Support, Training, Professional Services and Development > High Availability, Oracle Conversion, Postgres-XC, @cmdpromptinc > For my dreams of your image that blossoms > a rose in the deeps of my heart. - W.B. Yeats > > > -- > Sent via pgadmin-support mailing list > (pgadmin-support@postgresql.**org<pgadmin-supp...@postgresql.org> > ) > To make changes to your subscription: > http://www.postgresql.org/**mailpref/pgadmin-support<http://www.postgresql.org/mailpref/pgadmin-support> >