Hello, I setup a command to execute psql from TextMate. Psql is the command line utility one can use to send SQL commands to the PostgreSQL database and get the results of the queires sent. It was very easy to setup and get working the problem is that on queries that return relatively large amounts of data the OS as a whole lags and gives the spinning wheel of death during the execution of the command(I had output set to HTML). The test case I used was to execute the command on a query that returns about 140,000 rows with about 4 columns of data so pretty skinny data overall relative to typical database data. Is there any way to make TextMate not consume the machine during the executing of this command. Maybe only show X amount of row instead of all the data? I noticed TextMate was consuming 500+ megs of memory and had around 1.8 gigs of swap. Not sure if those levels were directly related to the query output or not. All I know is TextMate didn't handle that use case very well.
Regards, Bob
On 9. Apr 2007, at 06:42, Bob Henkel wrote:
[...] The test case I used was to execute the command on a query that returns about 140,000 rows with about 4 columns of data so pretty skinny data overall relative to typical database data.
Sure, but not skinny compared to what you typical *return* from a database query (and show in a web browser, which the HTML output mode basically is).
Is there any way to make TextMate not consume the machine during the executing of this command.
Since this is a problem with the HTML output window, i.e. WebKit, you could write a custom view (i.e. nib) for displaying the output. But even an NSTableView becomes sluggish with 140,000 rows (although it doesn’t cause swapping).
Maybe only show X amount of row instead of all the data?
Like adding “LIMIT x” to your query? Yes, you could also do that ;)