Index Problem
Index Problem
От:
"Kim Yunhan" <spbear@hanmail.net>
Дата:
I want to query this... --> SELECT * FROM bbs ORDER BY ref desc, step ASC LIMIT 12; this query doesn't refer the index that made by this query. --> CREATE INDEX idx_bbs ON bbs (ref, step); but, i change the query that "ref desc" to "ref asc". then query refer the index, and i can see a result very fast. :-( so, i want to view an result that one column ordered by ascending, and oterh column ordered by descending using index. what do i do? how make an index? ================================================== ================================================== 우리 인터넷, Daum 평생 쓰는 무료 E-mail 주소 한메일넷 지구촌 한글 검색서비스 Daum FIREBALL http://www.daum.net
PL/PGSQL Cook Book
От:
mark proctor <m.proctor@bigfoot.com>
Дата:
I've just spent the last day or two trying to get to grips with plpgsql and can't believe how abysmal the documetentation and examples are. I've been trawling through the mailist lists and I notice there was talk back in 1999 abouta PLPGSQL Cook Book - did anything come of this? If no one is maintaining something like this and people think its a good idea I think we should have another crack at it. I'd be happy to maintain something like this and put it up on the web, although I'm only a newbie and would rely upon user contribution. Here are some possible sections to help get people thinking. Even if you don't know the answer send me the questions and I'll add them to the list. How can I create Tree structures? Are recursive functions supported? Whats are the advanteds disadvantes of the different scipting langues PL/PGSQL, PL/Perl, PL/Tcl? How do variable scopes work in PL/PGSQL? Can I output variables from a function to the command line for debugging purposes? How to debug PL/PGSQL? Various examples for each of the statements Anyway lets discuss this, a lot could be done just from piecing together relavent tips from this mailing list. ie there are some good posts on tree structures, which if I'm willing to piece together if people think this project is worth while. Regards Mark
Re: PL/PGSQL Cook Book
От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
mark proctor writes: > I've been trawling through the mailist lists and I notice there was > talk back in 1999 abouta PLPGSQL Cook Book - did anything come of > this? If no one is maintaining something like this and people think > its a good idea I think we should have another crack at it. I'd be > happy to maintain something like this and put it up on the web, > although I'm only a newbie and would rely upon user contribution. Start writing, and send it to pgsql-docs@postgresql.org. It doesn't have to be a great work of literature; incremental work is just fine. > How can I create Tree structures? > Are recursive functions supported? > Whats are the advanteds disadvantes of the different scipting langues PL/PGSQL, PL/Perl, PL/Tcl? > How do variable scopes work in PL/PGSQL? > Can I output variables from a function to the command line for debugging purposes? > How to debug PL/PGSQL? > Various examples for each of the statements All valid questions. -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
Re: PL/PGSQL Cook Book
От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
Even a PL/PgSQL FAQ would be good. > mark proctor writes: > > > I've been trawling through the mailist lists and I notice there was > > talk back in 1999 abouta PLPGSQL Cook Book - did anything come of > > this? If no one is maintaining something like this and people think > > its a good idea I think we should have another crack at it. I'd be > > happy to maintain something like this and put it up on the web, > > although I'm only a newbie and would rely upon user contribution. > > Start writing, and send it to pgsql-docs@postgresql.org. It doesn't have > to be a great work of literature; incremental work is just fine. > > > How can I create Tree structures? > > Are recursive functions supported? > > Whats are the advanteds disadvantes of the different scipting langues PL/PGSQL, PL/Perl, PL/Tcl? > > How do variable scopes work in PL/PGSQL? > > Can I output variables from a function to the command line for debugging purposes? > > How to debug PL/PGSQL? > > Various examples for each of the statements > > All valid questions. > > -- > Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/ > > -- Bruce Momjian | http://candle.pha.pa.us pgman@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