pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Create Index?
4+ messages / 4 participants
[nested] [flat]

* Create Index?
@ 1999-01-24 21:22  John Cusick <jcusick@exotrope.net>
  0 siblings, 1 reply; 4+ messages in thread

From: John Cusick @ 1999-01-24 21:22 UTC (permalink / raw)
  To: pgsql-sql; pgsql-general@postgresql.org

I've recently upgraded to version 6.4 which was compiled on RedHat Linux
ver 5.1
with no apparent problems.

and with a test table;

create table partref
	(partnum varchar(15) not null, desc varchar(15), vnum varchar(60));

then;

create index indpart on partref (partnum);

returns;

ERROR: partind: cannot extend


This worked fine w/version6.3 on the same system.

I looked around in the changes and re-checked the man page.
Am I missing something way to obvious??

John Cusick
jcusick@exotrope.net



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [SQL] Create Index?
@ 1999-01-24 21:59  Bruce Momjian <maillist@candle.pha.pa.us>
  parent: John Cusick <jcusick@exotrope.net>
  0 siblings, 0 replies; 4+ messages in thread

From: Bruce Momjian @ 1999-01-24 21:59 UTC (permalink / raw)
  To: jcusick@exotrope.net; +Cc: pgsql-sql; pgsql-general@postgreSQL.org

> create index indpart on partref (partnum);
> 
> returns;
> 
> ERROR: partind: cannot extend
> 
> 
> This worked fine w/version6.3 on the same system.
> 
> I looked around in the changes and re-checked the man page.
> Am I missing something way to obvious??

You have run out of disk space.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* create index
@ 2002-11-19 06:44  ernest_it@hotmail.com <ernest_it@hotmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: ernest_it@hotmail.com @ 2002-11-19 06:44 UTC (permalink / raw)
  To: pgsql-sql

i don't know how to create the index about the following statement.


SELECT b.screen_id AS screen_id, b.name AS screen_name
FROM tbl_showlog AS a CROSS JOIN
tbl_screen AS b CROSS JOIN
tbl_company AS c
WHERE a.screen_id = b.screen_id
AND b.company_id = c.company_id
AND c.company_id = 1
AND c.is_active = 1
GROUP BY b.screen_id, b.name
ORDER BY b.screen_id

many thx!



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: create index
@ 2002-11-19 14:13  Tomasz Myrta <jasiek@klaster.net>
  parent: ernest_it@hotmail.com <ernest_it@hotmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Tomasz Myrta @ 2002-11-19 14:13 UTC (permalink / raw)
  To: ernest_it@hotmail.com <ernest_it@hotmail.com>; +Cc: pgsql-sql

Uz.ytkownik ernest_it@hotmail.com napisa?:
> i don't know how to create the index about the following statement.
> 
> 
> SELECT b.screen_id AS screen_id, b.name AS screen_name
> FROM tbl_showlog AS a CROSS JOIN
> tbl_screen AS b CROSS JOIN
> tbl_company AS c
> WHERE a.screen_id = b.screen_id
> AND b.company_id = c.company_id
> AND c.company_id = 1
> AND c.is_active = 1
> GROUP BY b.screen_id, b.name
> ORDER BY b.screen_id
Change your query to explicit joins. It looks much better and explains 
directly your problem.

Example:
SELECT screen_id, B.name as screen_name
FROM
  tbl_company C
  join tbl_screen B using (company_id)
  join tbl_showlog A using (screen_id)
WHERE
  company_id=1 and is_active=1


I don't know how many records do you have, but try to create indexes:
1. tbl_company -> company_id
2. tbl_screen -> company_id
3. tbl_showlog -> screen_id


Regards,
Tomasz Myrta




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2002-11-19 14:13 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-01-24 21:22 Create Index? John Cusick <jcusick@exotrope.net>
1999-01-24 21:59 ` Bruce Momjian <maillist@candle.pha.pa.us>
2002-11-19 06:44 create index ernest_it@hotmail.com <ernest_it@hotmail.com>
2002-11-19 14:13 ` Re: create index Tomasz Myrta <jasiek@klaster.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox