ORDER BY, LIKE !!?

From: "rex" <rex(at)berg(dot)dnttm(dot)ro>
To: <pgsql-general(at)postgreSQL(dot)org>
Subject: ORDER BY, LIKE !!?
Date: 1998-09-17 10:31:30
Message-ID: 01bde226$55a12260$6a2ca8c0@rex.berg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have :
- a table with more than 2.000.000 records. It looks like this :

+----------------------------------+----------------------------------+-----
--+
| Field | Type
|Length |
+----------------------------------+----------------------------------+-----
--+
| fileno | int4
|4 |
| size | int4
|4 |
| type | char2
|2 |
| date | datetime
|8 |
| host | varchar()
|32 |
| name(with path) | varchar()
|1024 |
+----------------------------------+----------------------------------+-----
--+
- a PostgreSQL 6.3
- 4.1 AIX system
- postmaster is started with the following parameters :
-i -B 1024 -S -o '-F -S 10240' -D/opt/pgdata

I want to select only few (100) rows, [from a given row,] having an order
criterium,
faster (< 2 min) :
" SELECT * FROM File WHERE name LIKE '%/u/projects%' [AND name LIKE ...]
ORDER BY name;"
[from the beginning of the row 750000]

OR

" SELECT * FROM File WHERE name LIKE '%/u/projects%' [AND name LIKE ...]
ORDER BY date;"
[from the beginning of the row 750000]

Could someone help me ?

Thanks,
rex

Browse pgsql-general by date

  From Date Subject
Next Message Gerardo Gallardo 1998-09-17 13:24:00 PostgreSQL capacity ?
Previous Message Anand Surelia 1998-09-17 09:56:58 HELP Check constraint