Re: [SQL] Re: 500KB PDF files for postgresql8.3, which is the most efficient way?

2011-05-28 Thread Piotr Czekalski
Hello Emi Lu, The detailed discussion was just about two weeks ago on the plpgsql list, worth of glance. Actually it is quite difficult to say which one is better in your case as it depends on utility (rapid file hostin or just storing but transaction safety is important, etc.). Generally it

Re: [SQL] column type for pdf file

2011-05-18 Thread Piotr Czekalski
Right! The external binary file storage has another advantage (that may be considered as disadvantage as well) - it is usually easier to develop and test mechanism as you're able to browse uploaded file result using os / application or even "exchange" file contents for test purposes, while in

[SQL] A function to count all ocurrences of a character within a string.

2011-03-07 Thread Piotr Czekalski
ains equal number of opening and closing parenthesis, and if there are any of them. Regards, Piotr Czekalski -- -- "TECHBAZA.PL" Sp. z o.o. Technologie WEB, eDB& eCommerce tel. (+4832) 7186081 fax. (+4832) 7003289 email:

Re: [SQL] Compare two Data bases Structure

2011-02-24 Thread Piotr Czekalski
W dniu 2011-02-24 01:03, manuel antonio ochoa pisze: How Can I do to compare two structures of data bases ? DBA != DBB I need wich functions and wich tables are not equals thnks I'd advise SQL Power Architect - very handy tool with graphical DB design capability. Will compare your databases

Re: [SQL] DELETE FROM takes forever

2011-02-10 Thread Piotr Czekalski
Are your IDs (in both tables) a subject of index? If so, analyze tables and indexes. If not, create an index for each ID - that may help. Post an explain plan of the query as well. I guess there is full scan instead of index scan, thus running over and over 800 rows vs 110mln rows may take a lo

Re: [SQL] how to get row number in select query

2011-01-27 Thread Piotr Czekalski
Gentelmen, I follow this thread and I don't exactly get an idea of yours, but isn't is as simple as (example: table "web.files" contains one column named "fileurl" ): select row_number() over(), X.fileurl from (select fileurl from web.files order by fileurl) X The only disadvantage is that

Re: [SQL] loosing data in postgres database

2011-01-24 Thread Piotr Czekalski
W dniu 2011-01-24 10:37, victor katemana pisze: hi everyone, i have a problem of loosing data in my postgres database whenever i restart my machine what could be the possible problem help me out? A plenty of reasons is possible, starting from uncommited transactions on shutdown till invalid fsy